[Menu, Select] Closes on mouseup
while cursor is still on trigger if clickable bounds are larger than trigger rect
#1232
Labels
bug 🐛
Something doesn't work
component: menu
This is the name of the generic UI component, not the React module!
component: select
This is the name of the generic UI component, not the React module!
Note:
alignItemToTrigger
must befalse
for SelectOn the docs the
Select
uses::before
and::after
pseudo-elements to make the clickable target larger than the actual highlighted trigger itself. This area is clickable, but themouseup
check can't "measure" this part sincegetBoundingClientRect
measures the inner trigger part, and so it closes on mouseup unexpectedly if you click inside the extended area.Screen.Recording.2024-12-26.at.6.31.55.pm.mov
base-ui/packages/react/src/select/trigger/useSelectTrigger.ts
Line 110 in 1d4206e
The text was updated successfully, but these errors were encountered: