File tree Expand file tree Collapse file tree
packages/react-native-gesture-handler/src/v3/components/Touchable Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,19 +89,14 @@ export const Touchable = (props: TouchableProps) => {
8989 }
9090 } , [ ] ) ;
9191
92- const onDeactivate = useCallback (
93- ( e : EndCallbackEventType ) => {
94- if ( ! e . canceled && ! longPressDetected . current && e . pointerInside ) {
95- onPress ?.( e ) ;
96- }
97- } ,
98- [ onPress ]
99- ) ;
100-
10192 const onFinalize = useCallback (
10293 ( e : EndCallbackEventType ) => {
10394 if ( pointerState . current === PointerState . INSIDE ) {
10495 onPressOut ?.( e ) ;
96+
97+ if ( ! e . canceled && ! longPressDetected . current ) {
98+ onPress ?.( e ) ;
99+ }
105100 }
106101
107102 pointerState . current = PointerState . UNKNOWN ;
@@ -157,7 +152,6 @@ export const Touchable = (props: TouchableProps) => {
157152 enabled = { ! disabled }
158153 onBegin = { onBegin }
159154 onActivate = { onActivate }
160- onDeactivate = { onDeactivate }
161155 onFinalize = { onFinalize }
162156 onUpdate = { onUpdate }
163157 defaultOpacity = { defaultOpacity }
You can’t perform that action at this time.
0 commit comments