Skip to content

Commit 3c84dd8

Browse files
committed
Fix stuck iOS pressables
1 parent ddf9ffa commit 3c84dd8

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

packages/react-native-gesture-handler/src/components/Pressable/stateDefinitions.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ function getIosStatesConfig(
6161
eventName: StateMachineEvent.NATIVE_BEGIN,
6262
callback: handlePressIn,
6363
},
64+
{
65+
eventName: StateMachineEvent.NATIVE_START,
66+
},
6467
{
6568
eventName: StateMachineEvent.FINALIZE,
6669
callback: handlePressOut,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ const Pressable = (props: PressableProps) => {
308308
stateMachine.handleEvent(StateMachineEvent.NATIVE_BEGIN);
309309
},
310310
onActivate: () => {
311-
if (Platform.OS !== 'android' && Platform.OS !== 'ios') {
311+
if (Platform.OS !== 'android') {
312312
// Native.onActivate is broken with Android + hitSlop
313313
stateMachine.handleEvent(StateMachineEvent.NATIVE_START);
314314
}

0 commit comments

Comments
 (0)