Skip to content
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

drawer does not slide out when swipe from left and does not close when tap on background screen #5259

Closed
jendev85 opened this issue Nov 21, 2018 · 7 comments

Comments

@jendev85
Copy link

Current Behavior

Recently updated to v3.0.0 and the DrawerNavigator no longer slides out when swiped and will not close when background screen is tapped

Expected Behavior

Before the upgrade, the Drawer would slide out when swiped left to right and would close when the screen in the background was tapped.

How to reproduce

The current stack:
AppContainer
-SwitchNavigator
-DrawerNavigator
-StackNavigator

Environment

software version
react-navigation 3.0.0
react-native 0.57.4
node 8.12.0
npm or yarn 6.4.1
@eriveltonelias
Copy link
Member

Hi @jendev85,

Can you create a runnable example on https://snack.expo.io ?

@vadimkorr
Copy link

Hello @eriveltonelias. Drawer can't be used in expo (issue is below). When I'm using another type of Navigator, it works. But this is kind of snack issue ((0, _reactNavigation.createDrawerNavigator) is not a function)
image

Source code: https://snack.expo.io/@vadimkorr/drawer-navigator

@vadimkorr
Copy link

vadimkorr commented Nov 21, 2018

Seems this relates to #5251
Fortunately, this solution fixes the issue: https://stackoverflow.com/a/53396072

@eriveltonelias
Copy link
Member

Hello @eriveltonelias. Drawer can't be used in expo (issue is below). When I'm using another type of Navigator, it works. But this is kind of snack issue ((0, _reactNavigation.createDrawerNavigator) is not a function)
image

Source code: https://snack.expo.io/@vadimkorr/drawer-navigator

yeah, you're right @vadimkorr.

@eriveltonelias
Copy link
Member

Seems this relates to #5251
Fortunately, this solution fixes the issue: https://stackoverflow.com/a/53396072

Thanks @vadimkorr! :) can you confirm if that works for you @jendev85 ?

@brentvatne
Copy link
Member

cc @tcdavis there appears to be a snack bug here

@brentvatne
Copy link
Member

also @jendev85 - as @vadimkorr suggested https://stackoverflow.com/questions/53394982/react-navigation-swipe-on-drawer-does-not-work-in-android/53396072#53396072 should solve your issue. it's important to follow the instructions for adding react-native-gesture-handler to your app :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants