New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 4 users
Status: Archived
Owner:
Closed: Oct 4
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment
Support screen.orientation.lock in Device Mode
Reported by nikm...@gmail.com, Mar 16 2017 Back to list
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36

Steps to reproduce the problem:
1. Open page in Chrome for Desktop
2. Open Dev Tools and toggle Device Toolbar
3. Execute call to screen.orientation.lock(...)

What is the expected behavior?
For the screen.orientation.lock call to work, in certain situations (see notes)

What went wrong?
A "screen.orientation.lock() is not available on this device" exception is thrown.

Did this work before? N/A 

Chrome version: 56.0.2924.87  Channel: n/a
OS Version: 10.0
Flash Version: Shockwave Flash 25.0 r0

I don't expect this call to work all the time, but...

- If my manifest is explicitly calling my app a fullscreen/standalone display

- and I'm in DevTools device mode where I already have the option to rotate the orientation of the "device"

then this feature would be 1) super handy for testing lock scenarios and 2) would allow me to more easily test/understand the various values allowed for the orientation property in a manifest
 
Cc: kavvaru@chromium.org
Labels: Needs-Feedback
Unable to reproduce the issue on windows 7, Mac 10.12.3 using chrome version 56.0.2924.87 with the below steps

1.Open dev tools and toggle device mode
2.Execute  screen.orientation.lock(...) in console
3.Got the error as "Uncaught SyntaxError: Unexpected token )"

Please find the attached screen shot and confirm if anything missed here.
Request you please provide us expected screen shot for better understanding the issue.

Thanks,
702069.png
70.9 KB View Download
Comment 2 by nikm...@gmail.com, Mar 16 2017
Sorry, I didn't literally mean to execute screen.orientation.lock(...). The '...' just meant pass in any valid value.

Instead try screen.orientation.lock('landscape-primary').
Project Member Comment 3 by sheriffbot@chromium.org, Mar 16 2017
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "kavvaru@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Comment 4 by hdodda@chromium.org, Mar 17 2017
Cc: hdodda@chromium.org
Labels: M-59 OS-Linux OS-Mac
Status: Untriaged
Tested on mac os 10.12.2 , windows 7 ,ubuntu 14.04  using chrome version 56.0.2924.87 and 59.0.3043.0 and issue is reproduced  with the below steps :

1.Open dev tools and toggle device mode
2.Execute screen.orientation.lock('landscape-primary') in console
3.Got the error as "Uncaught (in promise) DOMException: screen.orientation.lock() is not available on this device"

Issue is seen from M45 #45.0.2404.0 and is a non-regression issue , the issue behavior is different in older versions of chrome.

Marking it as untraiged , for further inputs on this.

Thanks!


Components: -Platform>DevTools Platform>DevTools>Mobile
Owner: dgozman@chromium.org
Status: Assigned
Status: Archived
Hi, why it has been archived?
This issue is happening now in the latest version.
Sign in to add a comment