New issue
Advanced search Search tips

Issue 818155 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Device emulation does not set correct innerWidth/innerHeight for non-responsive mobile pages

Reported by rhour...@gmail.com, Mar 2 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0

Steps to reproduce the problem:
1. Open the attached page myScreen.html in chrome
2. Go to dev tools and activate the device emulation
3. Choose a mobile device such as iPhone or Galaxy
4. Refresh the page and see the innerWidth/innerHeight values

What is the expected behavior?
The expected behavior can be seen when using the attached page  myScreenResponsive.html in step 1. instead. 
I expect to see innerWidth/innerHeight the same as the dimension values set for that device.

What went wrong?
I can see correct values for outerWidth/outerHeight, screen.width/screen.height, screen.availWidth/screen.availHeight but not for the innerWidth/innerHeight. 
When I use a responsive page I see correct values. 

The same problem appears when using the API with setDeviceMetricsOverride in an extension.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 65.0.3325.106 (Official Build) beta (64-bit) (cohort: Beta)  Channel: n/a
OS Version: 10.0
Flash Version: Shockwave Flash 26.0 r0

When testing a custom desktop page I can see that the innerWidth/innerHeight are correct but the outerWidth/outerHeight are wrong. 

Is this supposed to be like this? If yes, can you explain why? If not, can you fix please :)
 
resolution.zip
1.7 KB Download
wrong.PNG
25.6 KB View Download
correct.PNG
22.2 KB View Download
Components: Platform>DevTools

Comment 2 by ajha@chromium.org, Mar 6 2018

Labels: Needs-Triage-M65
Labels: Triaged-ET M-67 Target-67 FoundIn-67 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on reported chrome version 65.0.3325.146 and on the latest chrome version 67.0.3365.0 using Windows-10, Ubuntu 14.04 and Mac 10.12.6. As the issue is seen from M60(60.0.3072.0) considering it as non-regression and marking it as Untriaged.

Thanks!
Status: WontFix (was: Untriaged)
Thank you for filing the issue!

This is not a bug, that's how mobile browser works - when it detects that page is not "mobile-optimized", the html's width is bumped to 980px to enhance user experience.

Sign in to add a comment