Skip to content

Commit 235466f

Browse files
beqramogorhom
andauthored
fix: crash on swipe down (#1367)(by @beqramo)
* fix: crash on swipe down * fix: keyboard dismiss on JS thread * fix: call the keyboard dismiss method --------- Co-authored-by: Mo Gorhom <[email protected]>
1 parent 2e558d1 commit 235466f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/hooks/useGestureEventsHandlersDefault.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type GestureEventContextType = {
2121
isScrollablePositionLocked: boolean;
2222
};
2323

24-
const dismissKeyboardOnJs = runOnJS(Keyboard.dismiss);
24+
const dismissKeyboard = Keyboard.dismiss
2525

2626
export const useGestureEventsHandlersDefault: GestureEventsHandlersHookType =
2727
() => {
@@ -298,7 +298,7 @@ export const useGestureEventsHandlersDefault: GestureEventsHandlersHookType =
298298
absoluteY > WINDOW_HEIGHT - animatedKeyboardHeight.value
299299
)
300300
) {
301-
dismissKeyboardOnJs();
301+
runOnJS(dismissKeyboard)();
302302
}
303303
}
304304

0 commit comments

Comments
 (0)