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

Modal close causes orientation reset #23018

Closed
tedpaulsen opened this issue Jan 16, 2019 · 6 comments
Closed

Modal close causes orientation reset #23018

tedpaulsen opened this issue Jan 16, 2019 · 6 comments
Labels
Bug Component: Modal Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@tedpaulsen
Copy link

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

@hyochan
Copy link
Contributor

hyochan commented Jan 16, 2019

@tedpaulsen I've just tried this in Android and I couldn't reproduce this in expo sdk 32. I want you to verify that this is only occurring in ios.

@tedpaulsen
Copy link
Author

Yes, I just tried it on android as well -- unable to reproduce with expo sdk 32 and android sdk 27. Seems to be only on ios

@djbuch
Copy link

djbuch commented Jan 23, 2019

Hello,
I found the problem on iOS, it is happening when animationType is defined.

Perhaps you will find something with this clue.

Regards,

@bureyburey
Copy link

bureyburey commented Mar 3, 2019

try setting transparent={true} and see if the issue persists

it might require some other changes to work with transparent={true} (setting modal width/height)

@stale
Copy link

stale bot commented Aug 4, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 4, 2019
@stale
Copy link

stale bot commented Aug 11, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Aug 11, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Aug 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Component: Modal Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

6 participants