UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2278.0 Safari/537.36
Steps to reproduce the problem:
1. register event listeners for focusout, blur, focusin, focus
2. observe sequence of dispatched events upon shifting focus
Live test-case: http://medialize.github.io/ally.js/tests/browser-bugs/focus-event-order.html
What is the expected behavior?
The sequence per DOM Level 3  should be: focusout, focusin, blur, focus
What went wrong?
sequence is blur, focusout, focus, focusin
Did this work before? No
Chrome version: 42.0.2278.0 Channel: canary
OS Version: OS X 10.8.5
Flash Version: Shockwave Flash 16.0 r0
With the currently provided sequence the focusout and focusin events cannot be safely used to alter focus before it was given. The only "benefit" the current implementation brings with focusin over focus is that the former bubbles, the latter does not.
Gecko doesn't support focusin/focusout at all. WebKit suffers the same bug. IE11 dispatches focus events asynchronously thereby accidentally getting the sequence right, IE12 Win10 Tec Preview fixed the ansynchronous-bug and thereby messed up the sequence as well.