-
Notifications
You must be signed in to change notification settings - Fork 229
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
Wrong lock/unlock orientation behaviour on iOS Devices #80
Comments
The problem has a relationship with the code of CDVOrientation.m file:
If comment the line:
The problem disappears. |
I am having the same issue
The issue lies within step 7. Instead of just unlocking the orientation but keeping it as it is (or even better: updating it to the physical orientation of the device) the Seeing that the last release of this plugin was 2 years ago I have little hope of actually getting a fix. Too bad capacitor relys on this plugin for its orientation handling. |
Unfortunately there are even more issues with the iOS implementation:
|
I have the same issue, I already opened an issue (#82) and only after saw @WIStudent's comment. It has a little more information and also some code of the implementation, so I will leave that issue open. If anybody has any input, please use the other issue, as this one is regarding the lock/unlock mechanism. |
We are experiencing the exact same problem @Hanzofm and @WIStudent have described. Are there any updates/solutions? |
I believe this may be resolved by #102 (PR intended for iOS 16 issues, but contains code that I think would also address this issue) |
Bug Report
Problem
What is expected to happen?
-screenOrientation is locked in whole applicaction to screenOrientation.ORIENTATIONS.PORTRAIT_PRIMARY
-User enter into a page that can be rotated.(ex. a photo viewer)
-screenOrientation is unlocked and the user rotate the device to landscape mode.
-Users decide to close the page and the close method execute (when is already in landscape mode) :
screenOrientation.lock(this.screenOrientation.ORIENTATIONS.PORTRAIT_PRIMARY);
-the ui returns to the previous page and rotates to portrait
-Then in portrait mode, user decides to enter again into the page that can be rotated:
-the page does
screenOrientation.unlock();
The orientation should keep on Portrait mode.
What does actually happen?
After locked ui into
this.screenOrientation.ORIENTATIONS.PORTRAIT_PRIMARY
being in landscape orientation if unlock the orientation being in vertical orientation the ui returns to landscape mode automatically.Information
-Same code works fine on Android
-Tested on iOS devices 12 and 14
Environment, Platform, Device
iOS devices 12, ,13, 14 versions
Version information
Checklist
The text was updated successfully, but these errors were encountered: