Tapping a Dropdown Trigger on mobile immediately closes the dropdown again
Bug report
When updating from @radix-ui/react-dropdown-menu 2.1.16 to 2.1.17 this bug appears.
I suspect it has something to do with a change from onClick to onPointerDown, but coudn't find the root cause so far.
The problem is that apart from the menu immediately closing in my app, that the menu now opens on pointer down is really annoying, because when someone accidentally places their thumb on a dropdown trigger when scrolling, the menu immediately opens, because it doesn't differentiate between click and scroll anymore.
Current Behavior
Click:
Drag and release:
Expected behavior
Click:
Drag and release:
Reproducible example
Suggested solution
Revert to the onClick behaviour of 2.1.16
Additional context
Issue is still present in 2.1.18, that button you see is an Ionic IonButton, the Trigger does not have the asChild prop
Your environment
| Software | Name(s) | Version |
|---|---|---|
| Radix Package(s) | @radix-ui/react-dropdown-menu | 2.1.17 |
| React | n/a | 19 |
| Browser | Chrome / Firefox | Simulated mobile client with touch events! |
| Assistive tech | ||
| Node | n/a | |
| npm/yarn/pnpm | ||
| Operating System | MacOS | 15.7.4 |
Update: closing this since this is an old issue: https://github.com/radix-ui/primitives/issues/1912
it just surfaced again because we patched 2.1.16 and the patch didn't get applied to the newer version.