Skip to content

Commit f6ded60

Browse files
committed
Add comment about text selection issue in FF
1 parent 9011687 commit f6ded60

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.yarn/versions/48277b4f.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
declined:
2+
- primitives
3+
- "@radix-ui/react-menu"

packages/react/menu/src/Menu.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,8 @@ const MenuItem = React.forwardRef((props, forwardedRef) => {
672672
}}
673673
onPointerUp={composeEventHandlers(props.onPointerUp, (event) => {
674674
// Pointer down can move to a different menu item which should activate it on pointer up.
675-
// We dispatch a click for selection to allow composition with click based triggers.
675+
// We dispatch a click for selection to allow composition with click based triggers and to
676+
// prevent Firefox from getting stuck in text selection mode when the menu closes.
676677
if (!isPointerDownRef.current) event.currentTarget?.click();
677678
})}
678679
onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {

0 commit comments

Comments
 (0)