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

bugfix(react-tooltip): stops propagation on Escape keydown #24810

Conversation

bsunderhus
Copy link
Contributor

@bsunderhus bsunderhus commented Sep 15, 2022

Current Behavior

Currently pressing Escape key to dismiss a Tooltip, will propagate a Escape keydown event that might trigger dismiss in more than just the Tooltip itself. see #24750

New Behavior

  1. Stops propagating Escape keydown to ensure only Tooltip is dismissed.
  2. Captures keydown event on target document, to ensure Tooltip escape behaviour is the first thing to be executed.
  3. Adds Dialog e2e test scenario to ensure this behaviour

@fabricteam
Copy link
Collaborator

fabricteam commented Sep 15, 2022

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-tooltip
Tooltip
41.502 kB
14.623 kB
41.535 kB
14.639 kB
33 B
16 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-alert
Alert
83.511 kB
20.921 kB
react-avatar
Avatar
48.381 kB
13.696 kB
react-avatar
AvatarGroup
14.95 kB
5.989 kB
react-avatar
AvatarGroupItem
68.349 kB
19.039 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
188.001 kB
52.069 kB
react-components
react-components: FluentProvider & webLightTheme
33.394 kB
11.007 kB
react-dialog
Dialog (including children components)
81.048 kB
24.208 kB
react-portal-compat
PortalCompatProvider
5.851 kB
1.964 kB
🤖 This report was generated against a33448fe4a0f4117686c378f80b893d1406d95a8

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 15, 2022

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 c39d4d8:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@size-auditor
Copy link

size-auditor bot commented Sep 15, 2022

Asset size changes

⚠️ Insufficient baseline data to detect size changes

Unable to find bundle size details for Baseline commit: b111ddd

Possible causes

  • The baseline build b111ddd is broken
  • The Size Auditor run for the baseline build b111ddd was not triggered

Recommendations

  • Please merge your branch for this Pull request with the latest master build and commit your changes once again

@bsunderhus bsunderhus changed the title bugfix(react-tooltip): stops propagation on Escape key bugfix(react-tooltip): stops propagation on Escape keydown Sep 15, 2022
@fabricteam
Copy link
Collaborator

fabricteam commented Sep 15, 2022

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1343 1302 5000
Button mount 958 956 5000
FluentProvider mount 1562 1583 5000
FluentProviderWithTheme mount 640 629 10
FluentProviderWithTheme virtual-rerender 594 594 10
FluentProviderWithTheme virtual-rerender-with-unmount 625 629 10
MakeStyles mount 1890 1905 50000
SpinButton mount 2492 2525 5000

@bsunderhus bsunderhus force-pushed the react-tooltip/bugfix--stops-propagation-on-Escape-key branch 2 times, most recently from 43db6d5 to bd37c00 Compare September 15, 2022 12:54
@bsunderhus bsunderhus force-pushed the react-tooltip/bugfix--stops-propagation-on-Escape-key branch from bd37c00 to c39d4d8 Compare September 15, 2022 13:04
@bsunderhus bsunderhus marked this pull request as ready for review September 15, 2022 13:22
@bsunderhus bsunderhus requested review from a team, behowell and khmakoto as code owners September 15, 2022 13:22
Copy link
Contributor

@behowell behowell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making this change!

@bsunderhus bsunderhus merged commit 81de40f into microsoft:master Sep 20, 2022
@bsunderhus bsunderhus deleted the react-tooltip/bugfix--stops-propagation-on-Escape-key branch September 20, 2022 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants