WIStudent commented on issue #80:
URL: 
https://github.com/apache/cordova-plugin-screen-orientation/issues/80#issuecomment-850474815


   I am having the same issue
   
   1. Started with holding device in portrait-primary position and screen 
locked to portrait-primary"
   2. unlock()
   3. rotate device to landscape-secondary (clockwise)
   window.screen.orientation change event fires
   window.screen.orientation.type is now "landscape-secondary"
   4. lock("landscape-secondary")
   No event fires because orientation has not changed
   5. lock("portrait")
   window.screen.orientation change event fires
   window.screen.orientation.type is now "portrait-primary"
   6. rotate device to portrait-primary (counter clockwise)
   Nothing happens because orientation is locked.
   7. unlock()
   screen rotates to "landscape-secondary"
   window.screen.orientation change event fires
   window.screen.orientation.type is now "landscape-secondary"
   
   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 `unlock` call changes it back to the orientation that was 
active before the last `lock` call was made.
   
   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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to