Skip to content

Commit

Permalink
fix: crash on swipe down (#1367)(by @beqramo)
Browse files Browse the repository at this point in the history
* fix: crash on swipe down

* fix: keyboard dismiss on JS thread

* fix: call the keyboard dismiss method

---------

Co-authored-by: Mo Gorhom <gorhom.dev@gmail.com>
  • Loading branch information
beqramo and gorhom authored Jun 4, 2023
1 parent 2e558d1 commit 235466f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hooks/useGestureEventsHandlersDefault.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type GestureEventContextType = {
isScrollablePositionLocked: boolean;
};

const dismissKeyboardOnJs = runOnJS(Keyboard.dismiss);
const dismissKeyboard = Keyboard.dismiss

export const useGestureEventsHandlersDefault: GestureEventsHandlersHookType =
() => {
Expand Down Expand Up @@ -298,7 +298,7 @@ export const useGestureEventsHandlersDefault: GestureEventsHandlersHookType =
absoluteY > WINDOW_HEIGHT - animatedKeyboardHeight.value
)
) {
dismissKeyboardOnJs();
runOnJS(dismissKeyboard)();
}
}

Expand Down

0 comments on commit 235466f

Please sign in to comment.