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.
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.