Problem with React Navigation drawers - screen overlay not removed
See original GitHub issueDescription
Not 100% sure if this is a reanimated
thing or one for react-navigation
, however, with reanimated 2.0.0-rc.1
there is a weird bug when using a React Navigation drawer on Android that seems to prevent the overlay being removed correctly. It results in a screen being unclickable. This doesn’t happen with previous versions of reanimated (tested with 2.0.0-alpha.6
and bug is not present) and doesn’t seem to happen on iOS either.
Screenshots
Video below: https://user-images.githubusercontent.com/25434369/104173823-9e75f680-5406-11eb-9977-232a9b37bb53.mp4
Steps To Reproduce
- Clone this repo
- Run
yarn
to install packages (latestreact-navigation
is in here) - Run
yarn android
to run on your simulator/device. - Click the animate button a few times - everything works as expected
- Click ‘Open Drawer’ - the drawer opens
- Click on the backdrop to hide the drawer - the drawer will close
- Try and click anything else on the screen - it’s not possible, like there’s some kind of overlay still in place.
(If you slide the drawer out from the left-hand edge and slide it back in again, the screen does work as expected. It’s only when clicking on the backdrop to remove the overlay that this bug occurs).
Expected behavior
Drawer should work as expected and the screen should remain interactive once the drawer is closed.
Actual behavior
Screen can’t be interacted with once the drawer has closed.
Snack or minimal code example
Package versions
- React: 16.13.1
- React Native: 0.63.4
- React Native Reanimated: 2.0.0-rc.1
- NodeJS: 12.16.3
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:12 (1 by maintainers)
Top GitHub Comments
@sarthakpranesh @AhmadHddad
You can use patch-package to temporarily use patch from #1665.
@sarthakpranesh, @jakub-gonet, thanks guys, I was able to downgrade to a lower version of @react-navigation/drawer, it worked just fine “@react-navigation/drawer”: “^5.9.0”,