Screen Orientation: screen orientation does not reset to default orientation after unlock()
Reported by
xiuqix.j...@intel.com,
Nov 13
|
|||||||||
Issue description
Steps to reproduce the problem:
Steps to reproduce the problem:
1. put device at rest on a leveled surface
2. set device orientation lock to off
3. enter the test page, record its initial orientation type with screen orientation API(`screen.orientation.type`)
4. rotate to orientation type (`screen.orientation.lock("...")`)
5. unlock the screen orientation (`screen.orientation.unlock()`)
code snippet:
let initial_type = screen.orientation.type; // e.g. portrait-primary
screen.orientation.lock("landscape-primary");
screen.orientation.unlock();
let current_type = screen.orientation.type; //landscape-primary
assert_equals(initial_type, current_type); //false
What is the expected behavior?
current screen orientation type is equals to the initial one
What went wrong?
they are different
Did this work before? N/A
Does this work in other browsers? N/A
Chrome version: 72.0.3608.0 Channel: canary
OS Version: 7.1.1
Flash Version:
Spec link: https://w3c.github.io/screen-orientation/
spec says:
When the unlock() method is invoked, the user agent MUST run the steps to lock the orientation of theresponsible document to the responsible document's default orientation.
A document's default orientation is the set of orientations to which the screen orientation is locked when it is not explicitly locked by this API or any other means.
For the perspective of a document, locking to the default orientation is equivalent to unlocking because it means that it no longer has a lock applied. However, it does not mean that the default orientation has to be any.
,
Nov 13
,
Nov 14
,
Nov 14
@xiuqix.jiang: On navigating to above demo link in comment#1, it is showing File not found error. Could you please provide alternate URL or codepen to test this further. Thanks!
,
Nov 15
Sorry, the entry should be https://intel.github.io/generic-sensor-demos/sensor-tester/build/bundled/, then you can navigate to accelerometer-screen test by clicking the "Accelerometer screen coordinates" button on the left panel
,
Nov 15
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 15
Tested the issue on android and seeing both 0 and 270 radio buttons selected Steps to reproduce: -------------------------- 1. Launched chrome and navigated to https://intel.github.io/generic-sensor-demos/sensor-tester/build/bundled/ 2. Placed on leveled surface, selected 270 , clicked on reset 3. Observed selection of both 0 and 270. Attaching screencast for reference. Chrome version: 70.0.3538.80, 72.0.3608.5 [latest dev] , 72.0.3610.0 [latest canary] OS: Android 9.0 Android device: Pixel 2 XL @xiuqix.jiang: Please check the above steps and let us know if we miss anything. On which device is this issue seen? Any information on reproducing the issue would help in better triaging. Thanks!
,
Nov 15
,
Nov 15
Yeah, I cannot reproduce this issue on Android 9.0(the same result as you shared), but I can reproduce it on Android 7.1.1
,
Nov 15
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 16
@xiuqix.jiang: Tested this issue on Samsung Galaxy J7 with Android 7, and same behavior is seen. i.e; both 0 and 270 are being selected after clicking on reset button. On which device this issue is seen? Could you please provide screencast of the issue. Thanks!
,
Nov 16
I can only reproduce the issue on Nexus 9 with Android 7.1.1. In the screencast, you can see: 1. Initially, it is a vertical screen. 2. Click "270°", the page becomes a horizontal screen. 3. Click "RESET" button, the page is still a horizontal screen.
,
Nov 16
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 16
|
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by xiuqix.j...@intel.com
, Nov 13