You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the following structure registered in the FocusTracker (Parent and both Children):
Parent
Child1 (focused)
Child2
when the Child2 gets focused, blur events in DOM are fired both by the Child1 (which actually loses focus) and by the Parent (because FocusTracker adds listeners with useCapture).
ATM, only FocusTracker#_focus()clears the blur timeout, so in the situation above, only the second timeout is cleared and the first one is executed, which ends up with FocusTracker#isFocused sets to false despite the focus remaining within the FocusTracker's scope.
The solution is basically clearTimeout in FocusTracker#_blur.
The text was updated successfully, but these errors were encountered:
For the following structure registered in the FocusTracker (Parent and both Children):
when the Child2 gets focused,
blur
events in DOM are fired both by the Child1 (which actually loses focus) and by the Parent (becauseFocusTracker
adds listeners withuseCapture
).ATM, only
FocusTracker#_focus()
clears the blur timeout, so in the situation above, only the second timeout is cleared and the first one is executed, which ends up withFocusTracker#isFocused
sets tofalse
despite the focus remaining within theFocusTracker's
scope.The solution is basically
clearTimeout
inFocusTracker#_blur
.The text was updated successfully, but these errors were encountered: