fix(tooltip): ensure esc closes tooltip, avoid bubbling beyond the body#10220
Conversation
|
✔️ Deploy Preview for carbon-react-next ready! 🔨 Explore the source changes: 7c1e5b8 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/61aa7f71f0ae1500078c664a 😎 Browse the preview: https://deploy-preview-10220--carbon-react-next.netlify.app |
|
✔️ Deploy Preview for carbon-elements ready! 🔨 Explore the source changes: 7c1e5b8 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/61aa7f714816860008826d59 😎 Browse the preview: https://deploy-preview-10220--carbon-elements.netlify.app |
|
✔️ Deploy Preview for carbon-components-react ready! 🔨 Explore the source changes: 7c1e5b8 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/61aa7f718953b50008c572c8 😎 Browse the preview: https://deploy-preview-10220--carbon-components-react.netlify.app/ |
|
@tay1orjones not sure if i'm testing correctly. I went here: So i can click on the tooltip, press ESC when focus is on link/button, and it closes correctly. Once it merges and a new version is available i can test in my code sandbox links i created to confirm on both react 16 and 17 thanks |
|
@amortiz thanks! Yeah that's perfect. The storybook is running with React v17 right now. |
…dy (carbon-design-system#10220) Co-authored-by: Abbey Hart <abbeyhrt@gmail.com>
|
This has been published in v10.49.1. Here's two identical sandboxes demonstrating the fix with tooltip esc working as intended with both React v16 and React v17: React 16: https://codesandbox.io/s/carbon-tooltip-escape-delegation-react16-l1ih9 |
Closes #10204
Changelog
New
Changed
Testing / Reviewing
I'm sorry this has quite a few steps to fully test the changes here:
carbon-components-reactstorybook deploy preview:package.jsonto be 16.8.6 (here is a reference from the PR updating it to v17)packages/react/package.jsonto be 16.8.6yarn installat the rootyarn startthepackages/reactstorybookconsole.log(React.version);(anywhere, in a component, etc) - it should output to the consolev16.8.6