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 afterfocus. 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?
I noticed that the spec says
However, I couldn't find a single implementation that behaves this way. In all browsers I tested
focusin
is fired afterfocus
. Same is true ofblur
andfocusout
. Additionally,document.activeElement
is already updated to the new element in thefocusin
handler.Should the spec be updated to match implementations?