Skip to content

Commit 49a0ba5

Browse files
committed
Review changes
1 parent b2476d1 commit 49a0ba5

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • packages/react-native-gesture-handler/src/v3/components/Touchable

packages/react-native-gesture-handler/src/v3/components/Touchable/Touchable.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ export const Touchable = (props: TouchableProps) => {
9393
(e: EndCallbackEventType) => {
9494
if (pointerState.current === PointerState.INSIDE) {
9595
onPressOut?.(e);
96+
}
9697

97-
if (!e.canceled && !longPressDetected.current) {
98-
onPress?.(e);
99-
}
98+
if (!e.canceled && !longPressDetected.current && e.pointerInside) {
99+
onPress?.(e);
100100
}
101101

102102
pointerState.current = PointerState.UNKNOWN;
@@ -106,7 +106,7 @@ export const Touchable = (props: TouchableProps) => {
106106
longPressTimeout.current = undefined;
107107
}
108108
},
109-
[onPressOut]
109+
[onPressOut, onPress]
110110
);
111111

112112
const onUpdate = useCallback(

0 commit comments

Comments
 (0)