You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Softkeyboard overlap HTML text input field when you focus on input with StageWebView.
It happens if text input on web page at the bottom of screen and soft keyboard will be displayed over it.
Tested with multiple Android devices with different web pages and different OS versions and firmwares.
It has been tested with many different AIR versions even with latests AIR 32.0.0.144 beta and AIR 33.0.2.281.
The same problem in all cases.
It works fine for iOS.
Changing android:hardwareAccelerated in application manifest doesn't help.
Changing android:windowSoftInputMode in application manifest doesn't help. <softKeyboardBehavior>pan</softKeyboardBehavior> and other values doesn't help.
Changing renderMode in application manifest doesn't help.
Launch code below with any Android device. It will load test web page with many text inputs. Click on any text input which displayed at the bottom of screen.
Application example with sources attached. stagewebview_textinput_softkeyboard_bug.zip
package {
import flash.display.Sprite;
import flash.events.Event;
import flash.media.StageWebView;
import flash.geom.Rectangle;
public class StageWebViewTextInputSoftKeyboardBug extends Sprite {
private var stageWebView:StageWebView;
public function StageWebViewTextInputSoftKeyboardBug() {
addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event):void {
removeEventListener(Event.ADDED_TO_STAGE, init);
stageWebView = new StageWebView(true);
stageWebView.loadURL("https://codepen.io/maheshambure21/full/EozKKy");
stageWebView.viewPort = new Rectangle(0, 0, 1080, 1920);//You can change viewport for your test device
stageWebView.stage = stage;
}
}
}
Actual Result:
Softkeyboard overlap text input that user cannot see what entering.
Expected Result:
StageWebView content should pan so that the text field being targeted in always visible so users can see which text they are entering. This panning should be handled automatically by AIR.
Known Workarounds
none
The text was updated successfully, but these errors were encountered:
I faced this issue long time ago.
On android I had to monitor the keyboard size (some ane let you get the keyboard size) and adapt the viewport according it.
I faced this issue long time ago.
On android I had to monitor the keyboard size (some ane let you get the keyboard size) and adapt the viewport according it.
@marcanw, I can get real keyboard size via ANE but how to move web page inside StageWebView to make html text input field visible for user in such cases?
You just have to resize the viewport of the StageWebView in order to have the bottom of the viewport just on top of the keyboard. So the bottom of your page will be visible maybe after a scroll of the user but it will be possible for the user to see it.
Here is my code:
var kby:int = getKeyboardY();
var vh:int = webView.viewPort.height;
if(kby < vh) webView.viewPort = new Rectangle(0, 0,w, kby);
else if(kby > vh && svaH != vh) webView.viewPort = new Rectangle(0, 0,w, h);
Problem Description
Softkeyboard overlap HTML text input field when you focus on input with StageWebView.
It happens if text input on web page at the bottom of screen and soft keyboard will be displayed over it.
Tested with multiple Android devices with different web pages and different OS versions and firmwares.
It has been tested with many different AIR versions even with latests AIR 32.0.0.144 beta and AIR 33.0.2.281.
The same problem in all cases.
It works fine for iOS.
Changing
android:hardwareAccelerated
in application manifest doesn't help.Changing
android:windowSoftInputMode
in application manifest doesn't help.<softKeyboardBehavior>pan</softKeyboardBehavior>
and other values doesn't help.Changing
renderMode
in application manifest doesn't help.Tracker and related issues:
https://tracker.adobe.com/#/view/AIR-4159718
https://forum.starling-framework.org/d/11407-soft-keyboard-goes-over-stagewebview
https://community.adobe.com/t5/Air/Android-StageWebView-HTML-text-input-does-not-pan-app-when/td-p/8355529
https://stackoverflow.com/questions/22776614/push-up-keyboard-on-screen
Steps to Reproduce
Launch code below with any Android device. It will load test web page with many text inputs. Click on any text input which displayed at the bottom of screen.
Application example with sources attached.
stagewebview_textinput_softkeyboard_bug.zip
Actual Result:
Softkeyboard overlap text input that user cannot see what entering.
Expected Result:
StageWebView content should pan so that the text field being targeted in always visible so users can see which text they are entering. This panning should be handled automatically by AIR.
Known Workarounds
none
The text was updated successfully, but these errors were encountered: