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

When using modal={false} opening Combobox does not close Menu/Listbox #3512

Open
emily-curry opened this issue Oct 7, 2024 · 0 comments
Open

Comments

@emily-curry
Copy link

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

v2.1.9

What browser are you using?

Desktop (macOS) Chrome, Firefox, and Safari. Did not test on mobile.

Reproduction URL

https://codesandbox.io/p/devbox/heuristic-paper-7nhhcr

Describe your issue

With all popover components in headlessui, the behavior I expect is that when a popover is opened, it should close any others that are already opened, as this is the behavior that is demonstrated in most cases. However, when a Menu or Listbox is open, and I then click to open a Combobox, the Combobox opens and the Menu/Listbox does not close.

To reproduce issue this in the linked codesandbox, first open a Menu or Listbox. Then, click the ComboboxButton or ComboboxInput (immediate is set). Two popovers will be open, when only the popover for the Combobox should be open.

Interestingly, when opening a Popover first, the behavior is as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant