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 Menu open when user swipe from Non-edge point of screen in RTL application (Android only) #49

Closed
SaeedZhiany opened this issue Feb 5, 2019 · 6 comments

Comments

@SaeedZhiany
Copy link
Contributor

@SaeedZhiany SaeedZhiany commented Feb 5, 2019

Current Behavior

The problem exists only on Android
When application direction set to RTL ( I18nManager.forceRTL(true) ), drawer menu open on swiping left from any point on screen.

Expected Behavior

Just like in LTR direction I want open drawer menu when only user swipe from edge of screen, not any other points.
react-navigation 2.x does not have such problem.

How to reproduce

I created a github repository, clone and run it, then swipe to left from middle of screen, drawer will open. to better understanding of the problem, set I18nManager.forceRTL to false from the constructor and run it again (you must reload app twice to apply new direction), then when you try to swipe from middle of screen, the drawer does not open, it only opens when you swipe from edge (expected behavior)

Your Environment

software version
react-navigation 3.1.3
react-native 0.58.3
node 10.15.0
npm or yarn 6.7.0
@brentvatne brentvatne transferred this issue from react-navigation/react-navigation Feb 5, 2019
@SaeedZhiany SaeedZhiany changed the title Drawer Menu open when user swipe from Non-edge point of screen in RTL application Drawer Menu open when user swipe from Non-edge point of screen in RTL application (Android only) Feb 13, 2019
@beqramo

This comment has been minimized.

Copy link

@beqramo beqramo commented Feb 15, 2019

same here, please help

@vahidalizad

This comment has been minimized.

Copy link

@vahidalizad vahidalizad commented Feb 27, 2019

I had the same issue then i realized i can change the edgeWidth in the drawer options to - value.
you can use -width(95) and get the width from react-native-dimension.

@SaeedZhiany

This comment has been minimized.

Copy link
Contributor Author

@SaeedZhiany SaeedZhiany commented Mar 5, 2019

@vahidalizad thank you for your help, however, it's better to fix issue in library level. so I still keep this issue open till repository contributors may notice this problem.
another issue has mentioned the same problem in #51

@blueturtle13g

This comment has been minimized.

Copy link

@blueturtle13g blueturtle13g commented Mar 29, 2019

-width(95)

Thanks for your response but what you suggest is a bit ambiguous, this is the code you should use:

DrawerConfig:{
    drawerWidth: WIDTH*.83,
    drawerPosition: "right",
    edgeWidth: 50-WIDTH
    // 50 or whatever value you want to use as edgeWidth
};
@satya164

This comment has been minimized.

Copy link
Member

@satya164 satya164 commented Apr 23, 2019

@satya164

This comment has been minimized.

Copy link
Member

@satya164 satya164 commented May 15, 2019

Closing since the fix has been merged in gesture-handler.

@satya164 satya164 closed this May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.