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

Event: Stop shimming focusin & focusout events #4362

Merged
merged 1 commit into from
Apr 29, 2019

Conversation

mgol
Copy link
Member

@mgol mgol commented Apr 17, 2019

Summary

Latest versions of all browsers now implement focusin & focusout natively
and they all converged on a common event order so it doesn't make much sense
for us to normalize it to a different order anymore.

Note that it means we no longer guarantee that focusin fires before focus
and focusout before blur.

-123 bytes

Fixes gh-4300

Checklist

@mgol
Copy link
Member Author

mgol commented Apr 17, 2019

Note: this cannot go in as long as we test on Firefox 60 which doesn't support focusin & focusout. If we decide to drop this browser as part of #4347 (which I recommend) then this can land.

EDIT: I mixed up the version, this has been implemented since Firefox 52 so we're good to go.

@mgol mgol self-assigned this Apr 17, 2019
Copy link
Member

@dmethvin dmethvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a mention in README.md that should be removed as well.

@mgol
Copy link
Member Author

mgol commented Apr 18, 2019

@dmethvin Nice catch! PR updated.

@mgol
Copy link
Member Author

mgol commented Apr 18, 2019

I also added a new test checking if focusin & focusout work at all. I think we didn't have such test apart from the one checking the order so we'd actually lose some coverage by removing that test without a replacement.

Copy link
Member

@dmethvin dmethvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Latest versions of all browsers now implement focusin & focusout natively
and they all converged on a common event order so it doesn't make much sense
for us to normalize it to a different order anymore.

Note that it means we no longer guarantee that focusin fires before focus
and focusout before blur.

Fixes jquerygh-4300
@mgol mgol merged commit 8a74137 into jquery:master Apr 29, 2019
@mgol mgol deleted the focusin-patch branch April 29, 2019 19:13
mgol added a commit to mgol/jquery that referenced this pull request Apr 29, 2019
In IE, focus & blur events fire asynchronously, the test now accounts for that.

Ref jquerygh-4362
@lock lock bot locked as resolved and limited conversation to collaborators Oct 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

Stop shimming focusin/focusout in jQuery 4.0
4 participants