Description
Description
If focusout
& blur
handlers are attached on one input and focusin
& focus
on the second one, the order of events fired by jQuery is:
focusout
blur
focusin
focus
The order mandated by the spec and followed by IE 11 is:
focusout
focusin
blur
focus
EDIT: IE is not following the spec, though, as it fires only focusout
& focusin
synchronously and blur
/focus
asynchronously. This has been fixed in Edge and now all events are fired synchronously as in other browsers.
(The spec also mandates that focus is lost after focusout
& before blur
and gained after focusin
but before focus
event fires).
Chrome/Safari do the following:
blur
focusout
focus
focusin
Edge 13 does the following:
focusout
blur
focus
focusin
Firefox doesn't support those events yet but there's ongoing work in https://bugzilla.mozilla.org/show_bug.cgi?id=687787.
We're currently polyfilling this event everywhere except in IE. Since IE differs from our implementation and it's an obsolete browser it sounds bad to let it do its own thing different than what we have. Should we just shim everywhere?
Link to test case
https://jsfiddle.net/66znLhfw/2/