In web browsers, what's the difference between onblur and onfocusout?

As you know, the onBlur event fires for an element if that element had the focus, but loses it.

The onFocusOut event fires in this case, but also triggers if any child element loses focus.

For example, you have a div with special formatting because the human is currently editing a field in that area. You'd could use onFocusOut to turn that formatting off when focus leaves that div.

Up until very recently, onFocusOut was only used by IE. If that has changed, it has been very recent. Test in FF, Chrome, etc.


Acccording to the spec for the focusout event type:

This event type is similar to blur, but is dispatched before focus is shifted, and does bubble.

Whereas blur events do bubble, and are dispatched later.