Skip to content

fix: tab retargeting if focus moved during keydown #1296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

snowystinger
Copy link
Contributor

What

Closes #1188

Why

This is how the browser behaves, if focus is moved during the keydown of "Tab", then focus is moved from the new activeElement

I came across this in our own repo while testing some new changes.
adobe/react-spectrum#8700

How

Instead of using event target, we used the known activeElement when determining where focus should move

Checklist

  • Documentation
  • Tests
  • Ready to be merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The keydown.Tab behaviour handler assumes that the event target will always be the origin for determining focus
1 participant