退格不烧在Android手机的keyup事件 [英] backSpace not firing the keyup event in android mobile

查看:1115
本文介绍了退格不烧在Android手机的keyup事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是第一次,我正在移动应用程序 KEYUP 事件不触发如果我preSS 退格键按钮。

This is the first time,I am working on mobile Apps.keyUp event not firing If I press backspace button.

我做了一个的jsfiddle ,以供参考。

I made a jsFiddle for reference.

最初用户输入 23 然后删除用户 3 使用退格键button.While进入 23 事件触发,但同时删除时间事件不触发。

Initially user entered 23 and then user deleted 3 using backspace button.While entering 23 event firing but while delete time event not firing.

我使用设备:摩托罗拉motog,Android版本:4.4.2

如何才能解决这个问题,谁能帮我用一个例子code。

How can I fix this,can anyone help me with an example code.

推荐答案

现在的问题是镀铬的地方停止,因为Android 4.4系统的发射键preSS事件退格。这一直是个问题,在许多基于web视图的应用程序捕捉需要的事件。有一个从这个小浮雕使用输入事件时触发的用户类型的东西,糊状的东西,或者水龙头上的键盘等的.com按钮

The problem is somewhere Chrome stopped firing keypress events for "backspace" since Android 4.4. This has been problematic in many webview based apps to catch required events. There is a small relief from this by using the input event that fires whenever user types something, pastes something, or taps on ".com" button in the keyboard, etc.

这是最好的依靠输入事件,如果你正在寻找只捕获更改输入。如果你想要做preventing默认操作是没有用的。

It is best to rely on input event if you are looking only to capture changes to the input. It is not useful if you want to do preventing default actions.

有关你的情况,我认为它应该适合。但要注意,对于本次活动的支持,对早于安卓4.0版本。

For your case, I think it should fit. But beware, of the support for this event for earlier than Android 4 version.

更新小提琴 - <一个href="http://jsfiddle.net/aravindbaskaran/33Snz/24/">http://jsfiddle.net/aravindbaskaran/33Snz/24/

这篇关于退格不烧在Android手机的keyup事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆