New issue
Advanced search Search tips

Issue 832613 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

Mobile emulator fails to mock max-device-width media queries

Reported by volodym...@wix.com, Apr 13 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36

Steps to reproduce the problem:
1. Open dev tools, turn on mobile simulation
2. Select iPhone 6/7/8 simulation
3. execute `window.matchMedia('(max-device-width: 450px)').matches` in console

What is the expected behavior?
media query should match

What went wrong?
media query does not match

Did this work before? N/A 

Chrome version:  67.0.3395.0  Channel: stable
OS Version: OS X 10.13.3
Flash Version: 

Looks like media query is matched against the real machine so 
`window.matchMedia('(max-device-width: 1681px)').matches === true` for me.
Instead it should match against simulated device width, which is 375

Looks like it was broken somewhere between 65.0.3325.181 and 66.0.3359.81
 
Labels: Needs-Triage-M67
Labels: Needs-Feedback Triaged-ET
@Reporter: Please check the video and let us know if this is the behavior you are observing? On using window.matchMedia('(max-device-width: 1681px)').matches or window.matchMedia('(max-device-width: 450px)').matches observing result as true but when selecting iPhone 6/7/8 simulation -- max width is 425.


832613.mp4
2.5 MB View Download
Owner: dgozman@chromium.org
Status: Assigned (was: Unconfirmed)
Status: WontFix (was: Assigned)
Hmm... This works for me. Could you please try again on your end and report back?

Comment 5 by volodym...@wix.com, May 31 2018

Hi, It disappeared after reboot and no longer reproducible for me after that. 

Sign in to add a comment