diff --git a/node_modules/@radix-ui/react-select/dist/index.mjs b/node_modules/@radix-ui/react-select/dist/index.mjs index 53fb4de..fcf0883 100644 --- a/node_modules/@radix-ui/react-select/dist/index.mjs +++ b/node_modules/@radix-ui/react-select/dist/index.mjs @@ -856,6 +856,8 @@ const $cc7e05a45900e73f$export$13ef48a934230896 = /*#__PURE__*/ $01b9c$forwardRe return (_contentContext$itemR = contentContext.itemRefCallback) === null || _contentContext$itemR === void 0 ? void 0 : _contentContext$itemR.call(contentContext, node, value, disabled); }); const textId = $01b9c$useId(); + const isPointerDownRef = $01b9c$useRef(false); + const isPointerUpRef = $01b9c$useRef(false); const handleSelect = ()=>{ if (!disabled) { context.onValueChange(value); @@ -896,7 +898,15 @@ const $cc7e05a45900e73f$export$13ef48a934230896 = /*#__PURE__*/ $01b9c$forwardRe ), onBlur: $01b9c$composeEventHandlers(itemProps.onBlur, ()=>setIsFocused(false) ), - onPointerUp: $01b9c$composeEventHandlers(itemProps.onPointerUp, handleSelect), + // onPointerUp: $01b9c$composeEventHandlers(itemProps.onPointerUp, handleSelect), + onClick: $01b9c$composeEventHandlers(itemProps.onClick, ()=>{ + if (isPointerUpRef.current) handleSelect(); + }), + onPointerUp: $01b9c$composeEventHandlers(itemProps.onPointerUp, (event)=>{ + isPointerUpRef.current = true; + if (!isPointerDownRef.current) event.currentTarget.click(); + }), + onPointerDown: $01b9c$composeEventHandlers(itemProps.onPointerDown, ()=>(isPointerDownRef.current = true)), onPointerMove: $01b9c$composeEventHandlers(itemProps.onPointerMove, (event)=>{ if (disabled) { var _contentContext$onIte;