react-navigation / react-navigation

Routing and navigation for your React Native apps
https://reactnavigation.org
23.33k stars 4.98k forks source link

React Navigation Drawer opens a little when screen rotate #10368

Closed elmcapp closed 1 year ago

elmcapp commented 2 years ago

Current behavior

On iOS 15 device the drawer opens a little when screen rotate.

https://user-images.githubusercontent.com/64275658/154790762-579f2f54-32f5-4b58-a778-a05840251091.mp4

Expected behavior

drawer should stay closed when screen rotate

Reproduction

I have video

Platform

Packages

Environment

package version
@react-navigation/native
@react-navigation/bottom-tabs
@react-navigation/drawer
@react-navigation/material-bottom-tabs
@react-navigation/material-top-tabs
@react-navigation/stack
@react-navigation/native-stack
react-native-safe-area-context
react-native-screens
react-native-gesture-handler
react-native-reanimated
react-native-tab-view
react-native-pager-view
react-native
expo
node
npm or yarn
github-actions[bot] commented 2 years ago

Hey! Thanks for opening the issue. The issue doesn't seem to contain a link to a repro (a snack.expo.dev link or link to a GitHub repo under your username).

Can you provide a minimal repro which demonstrates the issue? A repro will help us debug the issue faster. Please try to keep the repro as small as possible and make sure that we can run it without additional setup.

github-actions[bot] commented 2 years ago

Couldn't find version numbers for the following packages in the issue:

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

elmcapp commented 2 years ago

"@react-navigation/bottom-tabs": "^6.2.0", "@react-navigation/drawer": "^6.3.1", "@react-navigation/material-bottom-tabs": "^6.1.1", "@react-navigation/material-top-tabs": "^6.1.1", "@react-navigation/native": "^6.0.8", "@react-navigation/stack": "^6.1.1", "react": "17.0.2", "react-native": "0.67.2",

github-actions[bot] commented 2 years ago

Hello πŸ‘‹, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.

elmcapp commented 2 years ago

still have this problem

github-actions[bot] commented 2 years ago

Hello πŸ‘‹, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.

elmcapp commented 2 years ago

still have this problem

github-actions[bot] commented 1 year ago

Hello πŸ‘‹, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.

elmcapp commented 1 year ago

Still having this issue

vcellu commented 1 year ago

We are also experiencing the same issue.

github-actions[bot] commented 1 year ago

Hello πŸ‘‹, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.

github-actions[bot] commented 1 year ago

Hey! This issue is closed and isn't watched by the core team. You are welcome to discuss the issue with others in this thread, but if you think this issue is still valid and needs to be tracked, please open a new issue with a repro.

ankuragrawal29 commented 1 year ago

We are also experiencing the same issue.

Dzban-Diego commented 1 year ago

I also get the same issue. After few hours i manage to find solution. The bug was present only when i add width: '100% to drawerStyle. I need the drawer to be full screen. I simple change it to width: dimentions.width to set width as the screen, and this is working as expected.

JJSLIoT commented 1 year ago

Facing the same issue, why is this issue closed in spite of so many user actively reporting this issue?

Dhananjay-JSR commented 1 year ago

Can you please provide a https://snack.expo.dev/ link for reproducing this issue with minimal setup

github-actions[bot] commented 1 year ago

Hey @elmcapp! Thanks for opening the issue. It seems that the issue doesn't contain a link to a repro.

The best way to get attention to your issue is to provide an easy way for a developer to reproduce the issue.

You can provide a repro using any of the following:

nimabk82 commented 8 months ago

any solution for this issue ?

ninamargretdadadottir commented 7 months ago

This worked for me:

<Drawer.Navigator defaultStatus={'closed'} drawerStyle: { width: Dimensions.get('window').width }>

SagarAhir commented 6 months ago

I am also facing this issue, Dimensions.get('window').width didn't work for me. also I have notice this issue while i am using drawerPosition: "right", for temporary fix I have used drawerType: "back" animation

klendi commented 5 months ago

I tried @ninamargretdadadottir solution and it worked. It seems like to act weird when applied custom width.

This worked for me:

const width = Dimensions.get("window").width;

....

drawerStyle: {
          width: width * 0.8,
        },
ankuragrawal29 commented 2 weeks ago

any luck with this issue?