-
-
Notifications
You must be signed in to change notification settings - Fork 783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: crash on swipe down #1367
fix: crash on swipe down #1367
Conversation
@@ -298,7 +297,7 @@ export const useGestureEventsHandlersDefault: GestureEventsHandlersHookType = | |||
absoluteY > WINDOW_HEIGHT - animatedKeyboardHeight.value | |||
) | |||
) { | |||
dismissKeyboardOnJs(); | |||
runOnJS(Keyboard.dismiss); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will crash with reanimated > 3.x
. My recommendation -> 94cf11e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
I haven't tested on V3.
So it means we need to bump the required reanimated version on this lib?
Or what is your suggestion?
That way it crashes on reanimated < 3.x
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update:
I tested on "react-native-reanimated": "~3.1.0"
and it works perfectly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes exactly, that is a fix that this PR has.
That was the cause of the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried this, but got this error now ReanimatedError: Trying to access property
dismiss of an object which cannot be sent to the UI runtime., js engine: reanimated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something like this works without problem (@LuisRego)
const dismissKeyboard = () => {
Keyboard.dismiss()
}
...
runOnJS(dismissKeyboard)();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Guys, Update/Edit: Please take a look |
thanks @beqramo for submitting this CR , i will prepare a new patch release today with this fix <3 |
fix: crash on swipe down (gorhom#1367)
this PR fixes the issue faced here:
#1366
Motivation
keyboard close was being called incorrectly which was causing a crash on the device.
This fix was tested on device