primitives
                                
                                 primitives copied to clipboard
                                
                                    primitives copied to clipboard
                            
                            
                            
                        Dropdown menu does not close if the dropdown menu item contains a Link
Bug report
Dropdown menu does not close if the dropdown menu item (which is clicked) contains a Link component
I suspect the link's onClick behaviour overrides/ the dropdown menu item's onClick behaviour.
Current Behavior
A bug example can be seen in these issues #2441 and shadcn-ui/ui#1725
Expected behavior
Should close the dropdown menu when clicked on items which have a Link component
Suggested solution
There is hacky way to fix this issue which is mentioned in shadcn-ui/ui#1725
Your environment
| Software | Name(s) | Version | 
|---|---|---|
| Radix Package(s) | react-dropdown-menu | 2.0.6 | 
| React | n/a | 18 | 
| Browser | Arc | 1.30.0 | 
| Node | n/a | 21.6.2 | 
| Operating System | macOS | 
This doesn't look like a Radix issue.
Here's an example using Radix Themes and a Next link:
https://github.com/radix-ui/primitives/assets/1539897/ec033f14-941f-4dab-a8ff-1d1f2e93bbb0
Note that Radix Themes only styles the primitive, doesn't add/modify functionality
Here's the code:
Thanks @benoitgrelard, this makes sense.