New issue
Advanced search Search tips

Issue 888944 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Nov 12
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Screen Orientation: screen orientation does not reset to default orientation after unlock()

Reported by xiuqix.j...@intel.com, Sep 25

Issue description

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: 71.0.3557.2  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. 
Labels: Needs-triage-Mobile
Cc: chelamcherla@chromium.org
Components: Blink>ScreenOrientation
Labels: Triaged-Mobile Needs-Feedback
@xiuqix.jiang: Please provide code in form of html file or codepen, this would help in further triaging of the issue.

Thanks!
Status: WontFix (was: Unconfirmed)
Closing this issue due to lack of feedback from reporter. Please feel free to raise a new issue if this is still seen on latest build #70.0.3538.80.

Thanks!

Sign in to add a comment