-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix(popover): wrapped popover outsideClick handling #21137
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
base: main
Are you sure you want to change the base?
fix(popover): wrapped popover outsideClick handling #21137
Conversation
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #21137 +/- ##
==========================================
- Coverage 92.60% 92.60% -0.01%
==========================================
Files 515 515
Lines 38225 38238 +13
Branches 5871 5845 -26
==========================================
+ Hits 35399 35409 +10
- Misses 2676 2679 +3
Partials 150 150
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Closes #21063
Closes #21110
Fixes two issues with popover:
I decided to fix both issues in the same PR as they both originate from the same function. Note that an issue very similar to the second one was fixed #20747, I decided to keep the test story from that PR to ensure there aren't any regressions.
Changelog
New
_handleOutsideClickthat prevent the popover from closing if the click was on the trigger button or the popoverContentTest 1 Should Open and CloseTest 2 Should Not Close On Content ClickTest 3 Should Open and CloseNote
All test stories, and their related imports and classes should be removed before merging
Testing / Reviewing
PR Checklist
As the author of this PR, before marking ready for review, confirm you:
[ ] Updated documentation and storybook examples[ ] Wrote passing tests that cover this change