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

Dialog closes when clicking outside options list of Radix UI Select #3571

Open
WhiteJoshuaD opened this issue Nov 22, 2024 · 0 comments
Open

Comments

@WhiteJoshuaD
Copy link

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

v2.2.0

What browser are you using?

Chrome

Reproduction URL

https://stackblitz.com/edit/sb1-n7fwwv?file=src%2Fcomponents%2FDialogForm.tsx

Describe your issue

When using a <Select> from Radix Primitives inside a Headless UI <Dialog>, clicking outside the list of options (but still within the modal content) closes the modal.

To reproduce:

  1. Click the "Open Form" button.
  2. Click "Select a Role" to open the options dropdown.
  3. Do not select an option. Instead, click anywhere inside the modal except inside the options dropdown (e.g., on the description text).
  4. The Dialog will close despite the click event being triggered from within the dialog.

This is similar to a previous issue, #2533, which has been marked as resolved.

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