Skip to content

Modal close causes orientation reset #23018

@tedpaulsen

Description

@tedpaulsen

Environment

  React Native Environment Info:
    System:
      OS: macOS 10.14.2
      CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
      Memory: 12.72 GB / 32.00 GB
      Shell: 4.4.23 - /usr/local/bin/bash
    Binaries:
      Node: 10.14.2 - ~/.nvm/versions/node/v10.14.2/bin/node
      Yarn: 1.12.3 - /usr/local/bin/yarn
      npm: 6.5.0 - ~/.nvm/versions/node/v10.14.2/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
    IDEs:
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.5.0 => 16.5.0
      react-native: https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz => 0.57.1

Description

This issue seems to be similar to #20402, but I'm still having this issue.

I am attempting to reproduce the modal demo as seen here on an iPad. When the orientation of the app is in landscape, the orientation of the app seems to be reset upon closing the modal. When the modal is reopened, it opens in the correct landscape orientation.

Expected Behavior
-> device in landscape orientation
-> modal opens in same landscape orientation
-> upon closing modal, the underlying view should be in the same landscape orientation -- not flipped

Observed Behavior
-> upon closing modal, the underlying view is in a different landscape orientation (flipped)
-> this also occurs if "orientation" is omitted from app.json

Reproducible Demo

A demo is available here. This demo works as expected because it is locked to portrait orientation, to accurately recreate the bug run it locally and make sure the "orientation" key in app.json is set to "landscape" or "default"
https://snack.expo.io/BkShXmnf4

Here I have "orientation": "landscape" in app.json
orientation-demo

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugComponent: ModalStaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions