The keydown.Tab
behaviour handler assumes that the event target will always be the origin for determining focus
#1188
Labels
bug
Something isn't working
Reproduction example
https://codesandbox.io/p/devbox/lgshc5
Prerequisites
onKeyDown
handler to a focusable nodeuser.tab()
or a lower level method)Expected behavior
The
Tab
keydown behaviour handler should use the currently focused element as the source for determining the tab destination.Actual behavior
The
Tab
keydown behaviour handler uses the event target as the source for determining the tab destination.User-event version
14.5.2
Environment
No response
Additional context
This is niche behaviour, but is used to create focus traps, etc, to constrain tabbing. This may well be causing #820.
The text was updated successfully, but these errors were encountered: