-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
ScreenOrientation.unlockOrientation() doesn't unlock #939
Comments
Can you try to modify your |
Moved |
@ivanovvitaly I just realized the plugin returns back a promise, see https://github.com/apache/cordova-plugin-screen-orientation/blob/master/www/screenorientation.js#L71-L83 I will do the necessary changes to the |
Orientation still stays locked after update. Following doesn't help
Unlock after timeout still works as workaround. |
@ivanovvitaly I tried wrapping unlock inside a $timeout ( Angular 1.5 ) and it's not working, still locked. Can you send me a code sample of what you speak of as a work-around? |
@tskweres ionViewWillUnload(){
ScreenOrientation.lockOrientation('portrait');
setTimeout(function() {
ScreenOrientation.unlockOrientation();
}, 300);
} |
I'm using ionic 1.7.16 and cordova-plugin-screen-orientation 3.0.1, and the unlock doesn't work on iphones... Any clue why? the lock works. |
@NadavB It also depends on the plugin method. |
this work fine for me
|
I have modal page presented in landscape mode. When user dismisses the modal page I want to return screen orientation back to portrait mode without locking the orientation.
The problem is that orientation does changes to portrait, however after screen is rotated to portrait it stays locked in portrait orientation and doesn't react on device rotation. Using ionic-native 2.2.14 and iPhone
code from modal page
As workaround if I add delay to unlock the orientation it works, after screen returned to portrait I can rotate the phone and it changes the screen orientation
So, maybe it does make sense to change lock\unlock functions to return Promise\Observable?
Please advice
The text was updated successfully, but these errors were encountered: