react-native-gesture-handler
react-native-gesture-handler copied to clipboard
DrawerLayout broken on RN 0.70
Description
Updated RN from 0.68 to 0.70 - DrawerLayout reappears right after closing and stays on the screen until you try to pull it out again
Steps to reproduce
- Open DrawerLayout
- Close DrawerLayout
- Drawer pops back after closing and doesn't go away
Snack or a link to a repository
--
Gesture Handler version
2.6.0
React Native version
0.70.0
Platforms
iOS
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Paper (Old Architecture)
Build type
Debug mode
Device
iOS simulator
Device model
No response
Acknowledgements
Yes
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
Hey! 👋
It looks like you've omitted a few important sections from the issue template.
Please complete Snack or a link to a repository section.
I can confirm this on my app, it happens with both iOS and Android after upgrading from RN 0.69.4 to RN 0.70.0
https://github.com/software-mansion/react-native-gesture-handler/blob/main/example/src/new_api/betterHorizontalDrawer/BetterHorizonatalDrawer.tsx is working for RN 70 although the touch interaction is slightly different (at-least for draw type "front"). The border edge jumps to where the finger is which can be quite abrupt when it in the middle of the draw.
As mentioned in https://github.com/facebook/react-native/issues/34665, using <DrawerLayout useNativeAnimations={false} />
fixes the issue.
This is a workaround until the real Animated
bug is fixed, I tested it both on Android and iOS.
Fixed in https://github.com/facebook/react-native/pull/34927.
I still have that issue with react-native 0.70.4 and react-native-gesture-handler 2.8.0 using the old architecture.
Setting useNativeAnimations
to false
fixes the issue, but the animations are stuttering. Am I missing something?