-
Notifications
You must be signed in to change notification settings - Fork 1.3k
ComboBox inside of a Popover doesn't close when clicked outside of the Popover #5684
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
Comments
Oh interesting, so the reason for this bug is that the Combobox is considered a
Not entirely sure the best way we should go about addressing this, perhaps we could track overlays that are react-spectrum/packages/@react-aria/overlays/src/useOverlay.ts Lines 105 to 109 in c3a4d63
|
Note for whoever picks this up in the future: this also happens with RSP ComboBox within a dialog as well |
@LFDanLu Hey I think I had a similar discussion with @snowystinger in #5338. |
Thanks for bringing up that up, it is indeed the same issue. I'll close this one favor of that one! |
Provide a general summary of the issue here
I don't know if this is a bug or expected behaviour but i noticed, that if you have a ComboBox inside of a Popover, you can only close it by clicking outside, when the click still is inside of the parent Popover. If you click anywhere else on the screen, the ComboBox will stay opened. When you check this behaviour on a Select component, it works as expected (or at least expected from me) - the Select dropdown closes as soon as you click anywhere outside of it.
🤔 Expected Behavior?
If a ComboBox is inside of a Popover, it should still close as soon as one clicks anywhere outside of it. It works like that for the select component.
😯 Current Behavior
If a ComboBox is inside of a Popover, it only closes if your "outside click" is still inside of the parent popover.
💁 Possible Solution
No response
🔦 Context
No response
🖥️ Steps to Reproduce
https://codesandbox.io/p/sandbox/quirky-architecture-nndhrz
Version
1.0.0
What browsers are you seeing the problem on?
Firefox, Chrome, Safari, Microsoft Edge
If other, please specify.
No response
What operating system are you using?
Mac OS 13.2.1 (22D68)
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
The text was updated successfully, but these errors were encountered: