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 fired
  • keydown , keyup contain keycode=229
  • keypress , input fired don't contain key
  • textinput isn't fired
  • maxlength attribute isn't honored on input[type=text] while user types (more maxlength 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:

before

after overriding oncreateinputconnection (g pressed):

after


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -