-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keyup event fired too late #6
Comments
@hlindset Thanks for the report. I'm trying to replicate here: http://jsfiddle.net/delambo/MNRH5/ I'm not experiencing that behavior when I tab away quickly - you can see the model attribute populated in the DOM and in the console. Let me know if I got the test case wrong. |
It happens when tab is pressed at almost the same time as the last character I type. Here's an updated fiddle that prints the source element for the keyup event: And a video demonstrating the behaviour: |
@hlindset Thanks for the modified fiddle and vid. I think the tab keyup is firing before the last character keyup event. You can see this behavior when you hold down one key until it displays several characters, then without letting go hit the tab key, then after the tab has clearly moved to the next input let go of the key. Notice how you lose that last keyup/character which is exactly what happens in your examples. Does this sound plausible? |
Yes, sounds plausible to me. The focus change when tabbing happens on keydown, so when the keyup event fires the focus has already been changed, thus the keyup event is fired for the "wrong" element. Binding the |
@hlindset Thanks for the help. I got this resolved on master. |
There seems to be an issue with the keyup event being fired on the wrong field when quickly tabbing to the next field after typing. The keyup event is being fired on the field that was tabbed to instead of on the field that was typed in.
Steps to reproduce:
After doing this the model's attribute will be "testin", as the field never received the last keyup event.
The text was updated successfully, but these errors were encountered: