windows.outerWidth wrong when simulating a laptop with hidpi screen using Developer Tools
Reported by
helmut.e...@gmail.com,
Aug 5 2016
|
||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36 Steps to reproduce the problem: 1. open chrome and developer tools 2. simulate a "laptop with HiDPI Screen" 3. open any web page, e.g. http://www.taccgl.org/tutorial/ 4. type window.outerWidth on the console What is the expected behavior? should print 1440 What went wrong? prints 1280 Did this work before? No Chrome version: Version 54.0.2820.0 canary (64-bit) Channel: canary OS Version: 8.1 Flash Version: Shockwave Flash 22.0 r0 Also after defining a custom laptop in developer tools, dpi=2 and width 1024 window.outerWidth returns 1280.
,
Aug 8 2016
Thank you for filing this issue!
The behavior described is intended. When we emulate desktop device (such as a laptop with HiDPI screen) which does not necessary force browser window being full-screen, we keep the current values for window.outer{Width,Height} and window.screen.{width,height}. It would be strange to force some specific value here.
Also, pages should not rely on outerWidth since it may change independently from page size (e.g. toggling toolbars in many desktop browsers).
,
Aug 9 2016
Thank you very much for the info which clarifies what is going on. The problem in my case is that my real monitor is smaller than the emulated one and so the emulated window.innerWidth becomes bigger than the window.outerWidth in a situation where browser and pinch zoom level were set to 1. This can never happen on a real device. |
||
►
Sign in to add a comment |
||
Comment 1 by eostroukhov@chromium.org
, Aug 5 2016Status: Assigned (was: Unconfirmed)