react-native-gesture-handler icon indicating copy to clipboard operation
react-native-gesture-handler copied to clipboard

DrawerLayout broken on RN 0.70

Open lightrow opened this issue 1 year ago • 24 comments

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

  1. Open DrawerLayout
  2. Close DrawerLayout
  3. 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

lightrow avatar Sep 07 '22 17:09 lightrow

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?

github-actions[bot] avatar Sep 07 '22 17:09 github-actions[bot]

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.

github-actions[bot] avatar Sep 07 '22 17:09 github-actions[bot]

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

renchap avatar Sep 07 '22 20:09 renchap

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.

siderakis avatar Sep 12 '22 03:09 siderakis

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.

renchap avatar Sep 16 '22 19:09 renchap

Fixed in https://github.com/facebook/react-native/pull/34927.

j-piasecki avatar Oct 11 '22 12:10 j-piasecki

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?

atheck avatar Oct 26 '22 08:10 atheck