-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: popover closing issue when clicked on overflow menu #16792
fix: popover closing issue when clicked on overflow menu #16792
Conversation
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
packages/react/src/components/OverflowMenu/OverflowMenu-test.js
Outdated
Show resolved
Hide resolved
697684e
this fix actually broken our application using the OverflowMenu but there is application logic in onClick property for the OverflowMenu, and the onClick callback will also update the other property for the OverflowMenu, then the OverflowMenu open state will be messed up, the menu body can not be opened properly. Add the event.stopPropagation() back or use a timeout in our onClick logic can work around this issue. |
Closes #16357
Popover doesn't close when OverflowMenu is Clicked. The issue is caused after this PR . event.stopPropagation was added to fix calling of handleOnClick twice. The issue doesnot persist now even after removing event.stopPropagation. To ensure the previous issue is not encountered after this PR, test cases has been added.
Changelog
Removed
Testing / Reviewing
Go to storybook->popover->test popover should get closed after clicking on overflowMenu or anywhere else.
Test the functioning of overflow menu stories also , it should work as intended and click event should not be called twice.