Skip to content

Commit 0ccd36e

Browse files
committed
Backfill the being callback when skipped by native recognizer
1 parent 5e1605f commit 0ccd36e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

packages/react-native-gesture-handler/src/v3/hooks/callbacks/stateChangeHandler.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ export function getStateChangeHandler<THandlerData>(
3838
(oldState === State.BEGAN || oldState === State.UNDETERMINED) &&
3939
state === State.ACTIVE
4040
) {
41+
// If the native recognizer skipped the BEGAN state, we still need to call the callback
42+
if (oldState === State.UNDETERMINED) {
43+
runCallback(CALLBACK_TYPE.BEGAN, callbacks, event);
44+
}
45+
4146
runCallback(CALLBACK_TYPE.START, callbacks, event);
4247
} else if (oldState !== state && state === State.END) {
4348
if (oldState === State.ACTIVE) {

0 commit comments

Comments
 (0)