Device emulation does not set correct innerWidth/innerHeight for non-responsive mobile pages
Reported by
rhour...@gmail.com,
Mar 2 2018
|
||||
Issue descriptionUserAgent: 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 :)
,
Mar 6 2018
,
Mar 9 2018
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!
,
Mar 12 2018
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 |
||||
Comment 1 by dtapu...@chromium.org
, Mar 5 2018