Wrong window size onload with Device Toolbar open
Reported by
bradleyb...@gmail.com,
May 1 2018
|
|||||||
Issue descriptionChrome Version : 66.0.3359.117 What steps will reproduce the problem? (1) Create a blank page and open the developer tools with the "Device Toolbar" (responsive emulator) checked. (2) The initial window width is not what is displayed, causing CSS media queries and JS to think the window is a different size (3) The issue is resolved by resizing the window any amount
,
May 1 2018
,
May 3 2018
Tested the issue on mac 10.13.3 and win-10 using chrome latest stable #66.0.3359.139. Attached a screen cast for reference. Following are the steps followed to reproduce the issue. ------------ 1. Opened about:blank in chrome and opened the developer tools with the "Device Toolbar" (responsive emulator) checked. 2. Observed different window width by comparing responsive height and width and the height and width in dev tools. reporter@ - Could you please check the attached screen cast and please let us know if anything missed from our end. A screen cast/screen shot if provided will be more helpful in understanding the issue. Also please let us know the reported OS version. Thanks...!!
,
May 5 2018
Please see attached screenshot. The code for the page is just one line of JS that alerts the window.innerWidth, you can see that chrome is alerting "1527" as the screen width, but the screen size should be 2036. It doesn't happen every time, it's about 50/50. When it does happen, if I resize the browser at all then check the window.innerWidth in JS, it shows correctly. This also affects CSS media queries.
,
May 5 2018
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
,
May 5 2018
See this screenshot too. The background should be RED, since the window is 2036px wide, but the background is showing BLUE. Again, as soon as I resize at all, the background switches to RED
,
May 8 2018
Able to reproduce this issue on reported version 66.0.3359.117,on latest canary 68.0.3424.0 using Mac 10.13.3, Windows 10 and Ubuntu 14.04. i.e; Seeing different screen width as shown in screenshot in comment#4 NOTE:Issue is seen in Firefox as well. This issue is seen from M-60. Hence considering this issue as Non-Regression and marking as Untriaged. Thanks!
,
May 11 2018
I was playing with the following html: <script> console.log(window.innerWidth); setInterval(() => console.log(window.innerWidth), 2000); </script> The innerWidth property seems to be not in sync with the responsive mode window.
,
May 14 2018
If you see 980px as innerWidth on non-mobile-optimized page, that's how browser works. Try to add meta viewport to indicate that page is indeed optimized for mobile browser.
,
May 15 2018
It happens even with a viewport set. Please see new attached image showing code with viewport included and 980px width, but the page alerts out a different size. Also see this screencast showing what happens as soon as I resize the window: https://screencast.com/t/HsuNvRynt |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by dtapu...@chromium.org
, May 1 2018