blur vs focusout — any real differences? [duplicate]

blur vs focusout — any real differences? [duplicate]

This question already has an answer here:

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

4 answers

Is there any difference between JS events blur vs focusout?
I have two textboxes: pwd and confirm pwd. I want to check password match when user tabs out of the confirm pwd textbox, for example. In this case which event should I use or does it matter?

Solutions/Answers:

Solution 1:

The documentation for focusout says (emphasis mine):

The focusout event is sent to an element when it, or any element
inside of it
, loses focus. This is distinct from the blur event in
that it supports detecting the loss of focus on descendant elements (in
other words, it supports event bubbling).

The same distinction exists between the focusin and focus events.

Solution 2:

As stated in the JQuery documentation

The focusout event is sent to an element when it, or any element inside of it, loses focus. This is distinct from the blur event in that it supports detecting the loss of focus on descendant elements (in other words, it supports event bubbling).

Related:  Object copied to second property via reference persists even after original property deleted?