blur vs focusout -- any real differences? [duplicate]
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?
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 theblur
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.
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).