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:
keypress
isn't firedkeydown
,keyup
containkeycode=229
keypress
,input
fired don't contain keytextinput
isn't firedmaxlength
attribute isn't honored oninput[type=text]
while user types (moremaxlength
chars 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