Skip to content

fix(OverflowMenu): add stopPropagation call to handleClick method#9816

Merged
andreancardona merged 2 commits into
carbon-design-system:mainfrom
rzhekova:fix-overflowmenu
Oct 7, 2021
Merged

fix(OverflowMenu): add stopPropagation call to handleClick method#9816
andreancardona merged 2 commits into
carbon-design-system:mainfrom
rzhekova:fix-overflowmenu

Conversation

@rzhekova

@rzhekova rzhekova commented Oct 6, 2021

Copy link
Copy Markdown
Contributor

Closes #9744

To fix the issue I added an event.stopPropagation() call to the handleClick method in OverflowMenu which stops it from happening. The event method appears to prevent propagation and bubbling up of events which is probably what happens with the click in OverflowMenu.

I have also added a unit test.

Thanks!

@rzhekova rzhekova requested a review from a team as a code owner October 6, 2021 15:45
@netlify

netlify Bot commented Oct 6, 2021

Copy link
Copy Markdown

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

🔨 Explore the source changes: 2004de6

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

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

@github-actions

github-actions Bot commented Oct 6, 2021

Copy link
Copy Markdown
Contributor

DCO Assistant Lite bot All contributors have signed the DCO.

@rzhekova

rzhekova commented Oct 6, 2021

Copy link
Copy Markdown
Contributor Author

I have read the DCO document and I hereby sign the DCO.

@netlify

netlify Bot commented Oct 6, 2021

Copy link
Copy Markdown

✔️ Deploy Preview for carbon-elements ready!

🔨 Explore the source changes: 2004de6

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

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

@netlify

netlify Bot commented Oct 6, 2021

Copy link
Copy Markdown

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

🔨 Explore the source changes: 2004de6

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

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

@andreancardona andreancardona enabled auto-merge (squash) October 7, 2021 15:22
@andreancardona andreancardona merged commit c53e708 into carbon-design-system:main Oct 7, 2021
@rzhekova rzhekova deleted the fix-overflowmenu branch October 7, 2021 17:25
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.

[Bug]: OverflowMenu's onclick calls 2 times after each click

3 participants