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

fix(tooltip): prevent escape keydown from bubbling #9875

Merged
merged 4 commits into from
Oct 18, 2021

Conversation

tay1orjones
Copy link
Member

@tay1orjones tay1orjones commented Oct 15, 2021

Closes #8502

Prevents the escape from bubbling through onKeyDown on Tooltip. Includes a new test to cover this functionality. I had to more thoroughly mock the debounce to include the cancel() Tooltip uses.

Changelog

Changed

  • tooltip: prevent escape keydown from bubbling

Testing / Reviewing

  • The default bottom tooltip story has been modified to include a handler mimicing the bug reproduction from the original issue. It should not get fired. Kind of silly, but we're explicitly trying to prevent something from happening.
  • If you pull down locally and revert my changes to Tooltip, the handler in storybook will incorrectly fire reproducing the initial problem.
  • ⚠️ The story needs reverted before this is merged⚠️ Edit: removed ✅

@tay1orjones tay1orjones requested a review from a team as a code owner October 15, 2021 20:59
@netlify
Copy link

netlify bot commented Oct 15, 2021

✔️ Deploy Preview for carbon-react-next ready!

🔨 Explore the source changes: 68a8ff3

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/616dc6f18c2c670007de2bc8

😎 Browse the preview: https://deploy-preview-9875--carbon-react-next.netlify.app

Copy link
Contributor

@abbeyhrt abbeyhrt left a comment

Choose a reason for hiding this comment

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

Woo! Looks good to me 🎉

@netlify
Copy link

netlify bot commented Oct 15, 2021

✔️ Deploy Preview for carbon-elements ready!

🔨 Explore the source changes: 68a8ff3

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/616dc6f1333e290007d790ec

😎 Browse the preview: https://deploy-preview-9875--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Oct 15, 2021

✔️ Deploy Preview for carbon-components-react ready!
Built without sensitive environment variables

🔨 Explore the source changes: 68a8ff3

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/616dc6f158a3b90008955c2b

😎 Browse the preview: https://deploy-preview-9875--carbon-components-react.netlify.app

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.

[Tooltip]: escape on button in tooltip propagates
3 participants