javascript - Android WebView HTML input keypress doesn't fire -
on devices (mostly samsung, others too) , combinations of: android version, webview version (even evergreen webview in android 7) , keyboard, there number of issues:
keypressisn't firedkeydown,keyupcontainkeycode=229keypress,inputfired don't contain keytextinputisn't firedmaxlengthattribute isn't honored oninput[type=text]while user types (moremaxlengthchars allowed , input validated when form submitted)
is there way fix these issues?
i found if extend webview , override oncreateinputconnection, of issues fixed:
public class webviewextended extends webview { @override public inputconnection oncreateinputconnection(editorinfo outattrs) { return new baseinputconnection(this, false); } } before overriding oncreateinputconnection:
after overriding oncreateinputconnection (g pressed):


Comments
Post a Comment