-
-
Notifications
You must be signed in to change notification settings - Fork 779
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: [v5]fix backdrop gesture #1467
Conversation
This may also fix #1446 |
Is this going to be merged or should we use it with a patch? |
thanks @itsramiel for submitting this PR, i will run multiple tests on your change and will update you |
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
it's not merged yet |
Is this supposed to also work with v4? I tried it but nothing is triggered onPress. |
@deeeed i think web support only in v5 |
can we get an update on this? |
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
still waiting for merge |
my only concern with this PR is that will block the layers behind backdrop when accessibility voice over is enabled ,, let me investigate it |
Please provide enough information so that others can review your pull request:
Motivation
Fixes #1465
Using the
BottomSheetBackdrop
component on web with latest v5 alpha 3 causes the following error:Uncaught TypeError: Cannot read properties of undefined (reading 'toString')
.This is due to an issue with
useAnimatedGestureHandler
and babel. You can read more here: [web] [babel plugin] TypeError: Cannot read properties of undefined (reading 'toString') when using useAnimatedGestureHandler software-mansion/react-native-reanimated#2435You can avoid this issue by following this solution -> TypeError: Cannot read properties of undefined (reading 'toString') software-mansion/react-native-reanimated#2994 (comment)
While this removes the error and backdrop shows fine, there is another issue:
handleOnPress
does not get calledSince we already call
runOnJs
and it is more effort I guess to go from the ui thread and call from js thread, we can just use an Animated Pressable and pass it on onPress.This will fix the uncalled onPress and remove the error so users of the lib dont have to do workarounds