Bug Report
Plugin(s)
@capacitor/screen-orientation 5.0.7
Capacitor Version
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 5.7.0
@capacitor/core: 5.7.0
@capacitor/android: 5.7.0
@capacitor/ios: 5.7.0
Installed Dependencies:
@capacitor/cli: 5.6.0
@capacitor/android: 5.7.0
@capacitor/core: 5.7.0
@capacitor/ios: 5.7.0
Platform(s)
Android and iOS
Current Behavior
When locking the screen orientation to 'landscape' it locks it to landscape left. Meaning that if I'm holding my phone in landscape right mode, the view rotates 180 degrees and locks there. (Same goes for android with landscape and landscape reverse).
You can see this is how its configured in the plugin code:
iOS:
|
case "landscape", "landscape-primary": |
Android:
Expected Behavior
If the phone is physically held in either landscape left or right (normal or reverse for android), when locking the orientation to 'landscape' it should lock the current orientation without rotating anything.
Code Reproduction
This simple app by WIStudent reproduces the problem: https://github.com/WIStudent/capacitor-screen-orientation-issue-reproduction-app/tree/main
Other Technical Details
Additional Context
Bug Report
Plugin(s)
@capacitor/screen-orientation 5.0.7
Capacitor Version
Platform(s)
Android and iOS
Current Behavior
When locking the screen orientation to 'landscape' it locks it to landscape left. Meaning that if I'm holding my phone in landscape right mode, the view rotates 180 degrees and locks there. (Same goes for android with landscape and landscape reverse).
You can see this is how its configured in the plugin code:
iOS:
capacitor-plugins/screen-orientation/ios/Sources/ScreenOrientationPlugin/ScreenOrientation.swift
Line 87 in be3dd68
Android:
capacitor-plugins/screen-orientation/android/src/main/java/com/capacitorjs/plugins/screenorientation/ScreenOrientation.java
Line 62 in be3dd68
Expected Behavior
If the phone is physically held in either landscape left or right (normal or reverse for android), when locking the orientation to 'landscape' it should lock the current orientation without rotating anything.
Code Reproduction
This simple app by WIStudent reproduces the problem: https://github.com/WIStudent/capacitor-screen-orientation-issue-reproduction-app/tree/main
Other Technical Details
Additional Context