Skip to content

Commit

Permalink
No-op is sufficient
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Apr 28, 2024
1 parent 5f0cc59 commit d88d73c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/components/Menu/index.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,10 @@ export function Trigger({children, label}: TriggerProps) {
},
props: {
...props,
onPointerDown: e => {
// Prevent false positive that interpret mobile scroll as a tap.
// This requires the custom onPress handler below to compensate.
// https://github.com/radix-ui/primitives/issues/1912
e.preventDefault()
},
// No-op override to prevent false positive that interprets mobile scroll as a tap.
// This requires the custom onPress handler below to compensate.
// https://github.com/radix-ui/primitives/issues/1912
onPointerDown: undefined,
onPress: () => {
if (window.event instanceof KeyboardEvent) {
// The onPointerDown hack above is not relevant to this press, so don't do anything.
Expand Down

0 comments on commit d88d73c

Please sign in to comment.