-
Notifications
You must be signed in to change notification settings - Fork 601
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
Fix toolbar stealing focus #6888
Merged
Merged
Conversation
This file contains 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
scomea
reviewed
Jan 10, 2024
fcollonval
requested review from
EisenbergEffect,
chrisdholt,
bheston,
radium-v and
KingOfTac
as code owners
February 20, 2024 10:28
@scomea Would you mind having another look at this one? |
bheston
approved these changes
Mar 16, 2024
scomea
requested changes
Mar 18, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the change comments, otherwise ok. Correct those and we'll merge.
change/@microsoft-fast-foundation-65238abc-a169-4169-a830-9dcdb4e9af99.json
Outdated
Show resolved
Hide resolved
change/@microsoft-fast-foundation-65238abc-a169-4169-a830-9dcdb4e9af99.json
Outdated
Show resolved
Hide resolved
scomea
approved these changes
Mar 19, 2024
9 tasks
janechu
pushed a commit
that referenced
this pull request
Jun 10, 2024
* Fix toolbar stealing focus * Implement suggestion by @scomea * Add test * Use 'getRootActiveElement' * Change files * Apply review comment --------- Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com> Co-authored-by: Stephane Comeau <stephcomeau@msn.com>
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.
Pull Request
📖 Description
If a toolbar element (e.g. a button) action results in changing the focus to an element somewhere in the page, the active toolbar element should not be focused by the toolbar.
This can be achieved by calling
preventDefault()
on the event.🎫 Issues
Fixes #6842
👩💻 Reviewer Notes
📑 Test Plan
I added a test with a toolbar button that set the focus to an external element. The test is against click and mouse down events.
✅ Checklist
General
$ yarn change
Component-specific
⏭ Next Steps