You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using side === 'bottom' and sideOffset === 0 and no padding anywhere (basically if the first item is flush with the trigger), the first item sometimes gets selected after clicking on the trigger towards the bottom of it.
We run our onSelect on mouseup in order to be able to open and select in one fell swoop like MacOS menu/select.
It seems that perhaps the menu shows up before it's completely in place or there's some kind of timing issue.
Bug report
Current Behavior
When using
side === 'bottom'
andsideOffset === 0
and no padding anywhere (basically if the first item is flush with the trigger), the first item sometimes gets selected after clicking on the trigger towards the bottom of it.Expected behavior
It shouldn't get selected.
Reproducible example
https://codesandbox.io/s/mystifying-saha-p031u?file=/src/App.js
Suggested solution
We run our
onSelect
onmouseup
in order to be able to open and select in one fell swoop like MacOS menu/select.It seems that perhaps the menu shows up before it's completely in place or there's some kind of timing issue.
Additional context
This issue was initially brought to our attention here: radix-ui/design-system#305
The text was updated successfully, but these errors were encountered: