When the FocusOut event is raised, how do you know which element receives the focus?
The correct way seems to be to use the event\'s relatedTarget p
I believe what you're looking for is document.activeElement.
document.activeElement
Returns the currently focused element, that is, the element that will get keystroke events if the user types any. This attribute is read only.
https://developer.mozilla.org/en-US/docs/Web/API/document.activeElement