File tree Expand file tree Collapse file tree
packages/react-native-gesture-handler/src/v3/components/Pressable Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -304,18 +304,17 @@ const Pressable = (props: PressableProps) => {
304304 }
305305 } ,
306306 onFinalize : ( _event , success ) => {
307- if ( Platform . OS !== 'web' ) {
308- // On Web we use LongPress().onFinalize() instead of Native().onFinalize(),
309- // as Native cancels on mouse move, and LongPress does not.
310- if ( success ) {
311- stateMachine . handleEvent ( StateMachineEvent . FINALIZE ) ;
312- } else {
313- stateMachine . handleEvent ( StateMachineEvent . CANCEL ) ;
314- }
315-
316- if ( Platform . OS !== 'ios' ) {
317- handleFinalize ( ) ;
318- }
307+ // On Web we use LongPress.onFinalize instead of Native.onFinalize,
308+ // as Native cancels on mouse move, and LongPress does not.
309+ if ( Platform . OS === 'web' ) {
310+ return ;
311+ }
312+ stateMachine . handleEvent (
313+ success ? StateMachineEvent . FINALIZE : StateMachineEvent . CANCEL
314+ ) ;
315+
316+ if ( Platform . OS !== 'ios' ) {
317+ handleFinalize ( ) ;
319318 }
320319 } ,
321320 disableReanimated : true ,
You can’t perform that action at this time.
0 commit comments