diff --git a/.yarn/versions/59cd6502.yml b/.yarn/versions/59cd6502.yml new file mode 100644 index 0000000000..fcf0f11f96 --- /dev/null +++ b/.yarn/versions/59cd6502.yml @@ -0,0 +1,5 @@ +releases: + "@radix-ui/react-select": patch + +undecided: + - primitives diff --git a/packages/react/select/src/Select.tsx b/packages/react/select/src/Select.tsx index 5e848d8caf..767db71403 100644 --- a/packages/react/select/src/Select.tsx +++ b/packages/react/select/src/Select.tsx @@ -1272,9 +1272,12 @@ const SelectItem = React.forwardRef( ref={composedRefs} onFocus={composeEventHandlers(itemProps.onFocus, () => setIsFocused(true))} onBlur={composeEventHandlers(itemProps.onBlur, () => setIsFocused(false))} - onClick={composeEventHandlers(itemProps.onClick, () => { + onClick={composeEventHandlers(itemProps.onClick, (event) => { // Open on click when using a touch or pen device - if (pointerTypeRef.current !== 'mouse') handleSelect(); + if (pointerTypeRef.current !== 'mouse') { + event.stopPropagation(); + handleSelect(); + } })} onPointerUp={composeEventHandlers(itemProps.onPointerUp, () => { // Using a mouse you should be able to do pointer down, move through