apache / apache/cordova-plugin-screen-orientation

Screen doesn't rotate many times on iOS from landscape to portrait

Open
#43 6 comments 4 reactions 0 assignees View on GitHub
bug platform: ios
Dominant language
JavaScript
Stars
219
Forks
234
PR merge metrics
No merged PRs in 30d

Description

On `iOS` (mostly on iPhone7 & iPhoneX), when we switch from `landscape` to `portrait`, the orientation doesn't change. There are two behaviour that we noticed:

1. The orientation doesn't change at all
2. Only the orientation of the webview doesn't change but keyboard opens fine in expected orientation

**Example of behaviour2 (buggy) when navigating to this page from a landscape page:**
![behaviour2-buggy](https://user-images.githubusercontent.com/1804514/51344831-82f9de80-1abf-11e9-995e-a87a4f1a5827.png)

**While this should be the page:**
behaviour2-correct

The same happens with the behaviour 1.

We tried to identify the pattern but nothing helped. We also tried to add a delay in between changing the orientation and navigation between the page but the behaviour is same.

```
Ionic:

ionic (Ionic CLI) : 4.8.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.0

Cordova:

cordova (Cordova CLI) : 7.1.0
Cordova Platforms : android 7.1.2, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 21 other plugins)

System:

Android SDK Tools : 26.1.1 (/Users/shashank/Library/Android/sdk)
ios-deploy : 1.9.2
ios-sim : 5.0.11
NodeJS : v8.12.0 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS Mojave
Xcode : Now using system ruby. Xcode 10.1 Build version 10B61
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the landscape-to-portrait transition on the reported iPhone 7 and iPhone X cases using the Ionic, Cordova, iOS, and plugin versions listed in the issue. Compare both reported failures: no rotation and a rotated keyboard with an unchanged webview. Done means navigation consistently produces the expected portrait orientation.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, javascript
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.