Screen Orientation: screen.orientation.lock("portrait-secondary") unable to rotate screen when the device orientation lock is on
Reported by
xiuqix.j...@intel.com,
Sep 25
|
||||||
Issue descriptionSteps to reproduce the problem: 1.Set device orientation lock is on. 2.Visit https://intel.github.io/generic-sensor-demos/sensor-tester/build/bundled/. 3.Click "Accelerometer screen coordinates" in the left. 4.Click "0˚" radio in the right. 5.Click "180˚" radio in the right. What is the expected behavior? The screen rotate to 180˚ when Click "180˚" radio. What went wrong? The screen didn't rotate. Did this work before? N/A Does this work in other browsers? N/A Chrome version: 71.0.3557.2 Channel: canary OS Version: 7.1.1 Flash Version: Spec link: https://w3c.github.io/screen-orientation/ References relevant code snippet: https://github.com/intel/generic-sensor-demos/blob/master/sensor-tester/src/orientation-changer.js BTW, when the device orientation lock is on, only "portrait-secondary" does not work, when the device orientation lock is off, "portrait-secondary" works well.
,
Sep 25
,
Sep 25
I don't think it's a Chrome bug and most likely Android does not do the change. Maybe we could handle this somehow but no one is really working on this feature anymore.
,
Sep 26
,
Sep 26
This looks like definitively a screen orientation issue unrelated to the device orientation sensor.
,
Sep 28
Tested this issue on Pixel 2 using 71.0.3563.0 and below are the observations When auto-rotate is off: ======================= 1. Navigated to above html file and selected "Accelerometer screen coordinates"" 2. Selected 180˚ and no screen rotation is seen. When auto-rotate is on: ======================= 1. Navigated to above html file and selected "Accelerometer screen coordinates"" 2. Selected 180˚ and screen rotation of 180˚ is seen. Attaching screencast for reference. @xiuqix.jiang: Please check the screencast and let us know if this is the behavior you are telling. Thanks!
,
Sep 29
Yeah, you did reproduce the issue.
,
Sep 29
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 |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by kenneth....@gmail.com
, Sep 25Adding a bit more info from our own app issue list: Surely looks like a Chrome bug, given that lockOrientation('portrait-secondary') succeeds but doesn't rotate and therefore doesn't send 'change' event. Different variations with 180 (portrait-secondary) fails, eg. 270 - 180 - 90 fail 90 - 180 - 270 fail 180 - 90 fail 90 - 180 - 0 fail It fails with AbortError. As 180 (portrait-secondary) completes with success without changing orientation, it makes sense if you read the spec text: https://w3c.github.io/screen-orientation/#dfn-apply-an-orientation-lock If one of the browsing contexts's document's pending promise is not null: Let doc be the document which has a not null pending promise. Reject doc's pending promise with DOMException whose name is AbortError. Set doc's pending promise to null . There is probably a pending promise that was never dealt with as it just "completed"