[英]onkeypress event not firing in Android Webview 4.4
OnKeyPress is not being called in android webview... My Html code is simple OnKeyPress 没有在 android webview 中被调用......我的 Html 代码很简单
<input type="number" onkeypress="myFunc()"/>
function myFunc(){
alert(fired up!);
}
All the other keyevents ie keyup, keydown are working.所有其他按键事件,即 keyup、keydown 都在工作。
Android Webview really doesn't fire onkeypress
event (even on newer versions of Android). Android Webview 确实不会触发onkeypress
事件(即使在较新版本的 Android 上)。
One posible solution is to replace it with onkeyup
or onkeydown
, like this:一种可能的解决方案是将其替换为onkeyup
或onkeydown
,如下所示:
<input type="number" onkeyup="myFunc()"/>
function myFunc(){
alert(fired up!);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.