New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 838491 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Wrong window size onload with Device Toolbar open

Reported by bradleyb...@gmail.com, May 1 2018

Issue description

Chrome 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


 
Components: Platform>DevTools
Labels: Needs-Triage-M66
Cc: krajshree@chromium.org
Labels: Needs-Feedback Triaged-ET
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...!!
838491.mp4
703 KB View Download
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.
Screen Shot 2018-05-05 at 9.19.26 AM.png
177 KB View Download
Project Member

Comment 5 by sheriffbot@chromium.org, May 5 2018

Labels: -Needs-Feedback
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
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
Screen Shot 2018-05-05 at 9.29.33 AM.png
306 KB View Download
Cc: sindhu.chelamcherla@chromium.org
Labels: -Pri-3 M-68 FoundIn-68 Target-68 OS-Linux OS-Mac OS-Windows Pri-2
Status: Untriaged (was: Unconfirmed)
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!
innerwidth.html
94 bytes View Download
838491.png
56.9 KB View Download

Comment 8 by alph@chromium.org, May 11 2018

Owner: dgozman@chromium.org
Status: Assigned (was: Untriaged)
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.
Status: WontFix (was: Assigned)
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.
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
Screen Shot 2018-05-14 at 9.13.47 PM.png
404 KB View Download

Sign in to add a comment