Skip to content
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

change instead of focusout? #16

Open
kevinmickey opened this issue Jun 19, 2016 · 1 comment
Open

change instead of focusout? #16

kevinmickey opened this issue Jun 19, 2016 · 1 comment

Comments

@kevinmickey
Copy link

I know duplicates are caught, but wouldn't running on change instead of focusout be simpler and have a little better performance?

@msigley
Copy link
Contributor

msigley commented Sep 19, 2016

The change event can be inconsistent as to when it is fired for an input across the browsers. Older browsers would fire the event for each keystroke in the input, then it turned into each keystroke with a delay to try and increase performance, and now the event is in the inconsistent state it is now.

It is always better to use focusout/focusin or input events for consistancy, especially with jquery. Because of the lack of focusout support in Firefox, it probably actually uses the change event in the jquery code to emulate the focusout event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants