Select component unexpectedly closes popover when clicking between select components
Bug report
Current Behavior
When clicking between select components it closes the popover.
Example: https://github.com/user-attachments/assets/8271f90c-4f81-4942-a8ae-630131d5a908
Expected behavior
When clicking on the other select component it should either open the new select component, close the currently open select component while keeping the popover component open.
Or close the current select component while keeping the popover component open.
Reproducible example
Suggested solution
Additional context
Was working fine for select component v2.1.1
I have tried with popover component v1.1.1 and v1.1.2
I'm also using shadcn
Your environment
| Software | Name(s) | Version |
|---|---|---|
| Radix Package(s) | @radix-ui/react-select": "2.1.2", @radix-ui/react-popover": "^1.1.2" | |
| React | v18.2.0 | |
| Browser | Chrome | |
| Assistive tech | ||
| Node | v18.18.0 | |
| npm/yarn | v10.8.2 | |
| Operating System | MacOs |
I am also getting the error of popover closing. Think its because of the "@radix-ui/react-popover": "^1.1.2" version. I am using "@radix-ui/react-select": "^2.1.1",
I found a temporary solution of setting the dependency to "@radix-ui/react-popover": "1.1.1"
I had no issues with this error when using select 2.1.1 but I needed to upgrade because the event propagation error, unfortunately it seems to have lead to a different bug lol.
Yeah. Hope there would be a fix for this
Update all radix packages to the latest versions and use --exact flag.
Update all radix packages to the latest versions and use --exact flag.
Probably the most obvious solution, and yet I spent hours trying to find a clever fix before stumbling upon your comment. Upgrading everything totally worked - thank you!