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

web, stack navigator: Previous screen doesn't disappear completely #632

Closed
orestis-z opened this issue Jun 7, 2019 · 2 comments
Closed

Comments

@orestis-z
Copy link

orestis-z commented Jun 7, 2019

After 3 months off keyboard and a new laptop I stumbled across the following bugs in both chrome and safari (the second one is major) while running react-native for web:

  • I have to set cardStyle: { flex: 1 } in the options of createStackNavigator, otherwise the cards (individual screens of the stack navigator) will have height 0.
  • When pushing a new screen into the navigation stack, the previous screen will become blank and occupy half of the top of the screen instead of disappearing completely. The bottom half of the screen will contain the pushed screen.

Testing on android I don't have those issues.

I don't know whether these issues are related to react-native-gesture-handler, react-navigation or react-native-web. I would appreciate any hints.

I used the most recent versions for all packages (react-native v0.59.9, react-navigation v3.0.9 and react-native-web v0.11.4, react-native-gesture-handler v1.3.0)

Current Behaviour

web version:

Expected Behaviour

mobile version:

How to reproduce

The problem arises only on the web version, not on the mobile versions. Vanilla StackNavigator:

const StackNavigatorContainer = createAppContainer(createStackNavigator(
  {
    FirstScreen: FirstScreen,
    SecondScreen: SecondScreen,
  },
  {
    initialRouteName: "FirstScreen",
    cardStyle: {
      flex: 1,
    }
  }
));

Your Environment

software version
react-navigation 3.0.9
react-native 0.59.9
react-native-web 0.11.4
react-native-gesture-handler 1.3.0
node 12.3.1
yarn 1.16.0
@orestis-z
Copy link
Author

I opened the same issue also here react-navigation/react-navigation#5984 and here necolas/react-native-web#1361

@EvanBacon
Copy link
Collaborator

Could you please close this issue in favor of react-navigation/react-navigation#5984.

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

2 participants