Support screen.orientation.lock in Device Mode
Reported by
nikm...@gmail.com,
Mar 16 2017
|
|||||
Issue descriptionUserAgent: 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
,
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').
,
Mar 16 2017
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
,
Mar 17 2017
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!
,
Mar 17 2017
,
Oct 4 2017
,
Nov 16 2017
Hi, why it has been archived? This issue is happening now in the latest version.
,
Oct 3
I'm seeing this too. If the desire is to emulate the 'target' device not having it available, then the screen.orientation.lock function should be undefined. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by kavvaru@chromium.org
, Mar 16 2017Labels: Needs-Feedback
70.9 KB
70.9 KB View Download