-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Fix tooltip swallowing keydown events for close in the event that the tooltip is already closed. #15990
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 tooltip swallowing keydown events for close in the event that the tooltip is already closed. #15990
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 4cdc3b8:
|
Perf AnalysisNo significant results to display. All results
|
Asset size changes
Baseline commit: 9812fcdcad2bc081ec41c4bee23a5e935533b3ea (build) |
|
🎉 Handy links: |
#### Pull request checklist - [ ] Addresses an existing issue: Fixes #0000 - [X] Include a change request file using `$ yarn change` #### Description of changes Currently, we are attempting to capture keydown events on the tooltip (particularly the Escape and Ctrl key) even when the tooltip is closed. This means that in the event that the tooltip belongs to an element in a dialog or another component that listens to the same keydown event, the event is swallowed. We should check to see that the tooltip is open before attempting to handle this event (so that we don't stop event propagation). This is a cherry-pick from a change that was recently merged into v7.0 in this pull request. #15990 #### Focus areas to test (optional)
Pull request checklist
$ yarn changeDescription of changes
Currently, we are attempting to capture keydown events on the tooltip (particularly the Escape and Ctrl key) even when the tooltip is closed. This means that in the event that the tooltip belongs to an element in a dialog or another component that listens to the same keydown event, the event is swallowed. We should check to see that the tooltip is open before attempting to handle this event (so that we don't stop event propagation).
Focus areas to test
(optional)