w3c / uievents

UI Events
https://w3c.github.io/uievents/
Other
145 stars 51 forks source link

Update focusin/focusout event order to match implementations? #276

Closed devongovett closed 3 years ago

devongovett commented 3 years ago

I noticed that the spec says

This event type MUST be dispatched before the element is given focus. The event target MUST be the element which is about to receive focus. This event type is similar to focus, but is dispatched before focus is shifted, and does bubble.

However, I couldn't find a single implementation that behaves this way. In all browsers I tested focusin is fired after focus. Same is true of blur and focusout. Additionally, document.activeElement is already updated to the new element in the focusin handler.

Should the spec be updated to match implementations?

saschanaz commented 3 years ago

It seems this is a duplicate of #88.