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

[Bug]: MenuButton and ComboButton not closing when clicking outside in a Modal #17066

Open
2 tasks done
riddhybansal opened this issue Jul 30, 2024 · 2 comments
Open
2 tasks done

Comments

@riddhybansal
Copy link
Contributor

Package

@carbon/react

Browser

No response

Package version

v10.62

React version

No response

Description

When using MenuButton and ComboButton components inside a ComposedModal in Carbon Design System, the menus do not close when clicking outside of the menu area. This behavior is inconsistent with the expected behavior of dropdowns and menus, which should close when clicking outside of them.

Reproduction/example

https://stackblitz.com/edit/github-f6aces?file=src%2FApp.jsx,package.json

Steps to reproduce

  1. Create a ComposedModal with MenuButton and ComboButton components inside the modal body.
  2. Open the modal.
  3. Click on the MenuButton or ComboButton to open the menu.
  4. Click outside the menu area within the modal or outside the modal.
  5. Notice that the menu remains open.

Expected Behavior:
The menu should close when clicking outside of the menu area, both within the modal and outside the modal.

Actual Behavior:
The menu remains open when clicking outside of the menu area.

Suggested Severity

Severity 2 = User cannot complete task, and/or no workaround within the user experience of a given component.

Application/PAL

No response

Code of Conduct

@tay1orjones
Copy link
Member

tay1orjones commented Sep 11, 2024

May be fixed by #17277

This is a separate issue

@preetibansalui
Copy link
Contributor

Should be fixed with this PR

@preetibansalui preetibansalui moved this from 🏗 In Progress to 🚦 In Review in Design System Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🚦 In Review
Development

No branches or pull requests

3 participants