Fix Select keyboard focus trap#7103
Closed
snowystinger wants to merge 5 commits into
Closed
Conversation
a79adcf to
3013156
Compare
c08096a to
3503d62
Compare
devongovett
reviewed
Oct 15, 2024
| } else { | ||
| triggerRef.current.focus(); | ||
| } | ||
| }, |
Member
There was a problem hiding this comment.
Wonder if the above comment still applies, or whether we could make the input have tabIndex={-1} now. This is somewhat complicated...
Member
Author
There was a problem hiding this comment.
I'll make another branch we can test that on, because, agreed, this is complicated
5 tasks
Member
Author
|
Closing in favor of #7200 |
Member
Author
|
Reopening because the other option may break android |
Member
Author
|
Closing in favor of #7200 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #7019
Couple assumptions. The only way to focus the hidden select is via keyboard tab/shift+tab. If focus is coming from the document.body (such as if the user clicks near the Select, then hits tab), then focus should just go directly to the Select, not the extra button. We can't tell what the intent was and the behavior of a click followed by tab differs across browsers anyways.
✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project: