Skip to content

Commit

Permalink
fix(mobile): context menu crash when released too quickly (#2732)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoban authored Feb 12, 2025
1 parent bc252c3 commit 1327f56
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/mobile/src/components/ui/pressable/item-pressable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ export const ItemPressable: typeof Pressable = memo(({ children, ...props }) =>
onPressOut={composeEventHandlers(props.onPressOut, () => setIsPressing(false))}
onHoverIn={composeEventHandlers(props.onHoverIn, () => setIsPressing(true))}
onHoverOut={composeEventHandlers(props.onHoverOut, () => setIsPressing(false))}
// This is a workaround to prevent context menu crash when release too quickly
// https://github.com/nandorojo/zeego/issues/61
onLongPress={composeEventHandlers(props.onLongPress, () => {})}
delayLongPress={props.delayLongPress ?? 100}
className={cn(props.className, "bg-secondary-system-background relative")}
style={props.style}
>
Expand Down

0 comments on commit 1327f56

Please sign in to comment.