Skip to content
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

Handle entering FocusWrap from outside #3641

Merged
merged 1 commit into from
Jan 18, 2025
Merged

Conversation

SteffenDE
Copy link
Collaborator

When FocusWrap was used, but the previous focus was outside of the wrapped element, the browser would try to focus the boundary element, causing us to focus the last element instead. This is fixed by checking the relatedTarget of the event, and specially handling focus coming from outside.

Fixes #3636.

When FocusWrap was used, but the previous focus was outside of the wrapped
element, the browser would try to focus the boundary element, causing us
to focus the last element instead. This is fixed by checking the relatedTarget
of the event, and specially handling focus coming from outside.

Fixes #3636.
@chrismccord chrismccord merged commit d94b69c into main Jan 18, 2025
14 checks passed
@chrismccord
Copy link
Member

❤️❤️❤️🐥🔥

@chrismccord chrismccord deleted the sd-focus-wrap-enter branch January 18, 2025 15:28
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.

Possible bug with <.focus_wrap>
2 participants