Side navigation
#15101 closed bug (invalid)
Opened May 20, 2014 11:20AM UTC
Closed June 04, 2014 08:53AM UTC
Events aren't properly rebound to an input upon focus (on Android)
Reported by: | kelvindart | Owned by: | kelvindart |
---|---|---|---|
Priority: | high | Milestone: | None |
Component: | event | Version: | 2.1.1 |
Keywords: | event,on | Cc: | |
Blocked by: | Blocking: |
Description
I have an issue whereby my keyup event is not properly rebound to an input element, on Android 4.4.2 (Samsung Galaxy S4), after losing focus. This seems to be an issue on Android only as far as I can tell.
I have the following page, which is where the issue replicates. I would have liked to show you in jsFiddle, but unfortunately, due to the frames, it does not replicate there - so you'll need to set up a local web server, and point an Android phone to your local server with the pastebin.
The steps to get the issue to occur are as follows:
1) Enter focus in the first text box.
2) Begin typing as normal (type at least 5 characters, it is not dependent on how much, but you need enough characters to illustrate the issue), and observe the alert that pops up for each key stroke.
3) Press backspace once or twice - and observe the alert continues to still show (i.e. the 'keyup' event has continued to fire).
4) Set focus to the second text box.
5) Observe the alert which pops up, indicating the blur event has fired on the first text box.
6) Re-focus in the first textbox.
7) Begin pressing backspace.
8) Observe that ''no'' pop up has occurred - i.e. the 'keyup' event has ''not'' fired.
9) Begin typing again (i.e. normal text).
10) Observe the the pop up now shows - so the keyup event ''has'' fired.
11) Press backspace now and finally, observe the pop up, so the keyup event is firing again.
So, the issue seems to be when you refocus on the text box, and begin pressing backspace immediately, the keyup event is not fired.
I have also tested for keydown and keypress as well - same scenario unfortunately. Originally found in v1.9.1, but replicated in the latest version too.
Thanks.
Attachments (0)
Change History (2)
Changed May 20, 2014 07:57PM UTC by comment:1
owner: | → kelvindart |
---|---|
status: | new → pending |
Changed June 04, 2014 08:53AM UTC by comment:2
resolution: | → invalid |
---|---|
status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
Thanks for the repro steps.
Can you create a non-jQuery example using
addEventListener
and/or theonfocus
andonkeyup
inline event handlers? Does that fail as well?Does this work for other browsers you've tried then, and only fails for recent Android?
It's possible that the
alert()
call is messing with the ability of the browser to handle focus, so you might want to try some other mechanism to indicate the state changes.If the problem is with event generation in the browser it usually isn't possible for us to fix it inside jQuery, so the answer there will be important.