New issue
Advanced search Search tips

Issue 601423 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: May 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

window.matchMedia("(hover)").matches return true while in mobile emulation mode

Reported by emad...@gmail.com, Apr 7 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36

Steps to reproduce the problem:
1. Open dev tools
2. select toggle device mode and select mobile device that does not have hover
3. from console run window.matchMedia("(hover)").matches. The value is true and the emulated device does not have hover.

What is the expected behavior?
window.matchMedia("(hover)").matches should return false when emulating mobile devices.

What went wrong?
can not really use window.matchMedia in the emulation

Did this work before? N/A 

Chrome version: 49.0.2623.110  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 21.0 r0

it would be nice if the window.matchMedia can be emulated.
 
Owner: dgozman@chromium.org
Status: Assigned (was: Unconfirmed)
@dgozman: do you think we can do this?
Cc: rbyers@chromium.org
Status: WontFix (was: Assigned)
We actually emulate hover and pointer media queries correctly. See https://codereview.chromium.org/1343843004/.

When I evaluate "window.matchMedia("(hover)").matches" on the real device, I get true anyway. I think that's because the default is "hover: on-demand". Rick should know better.

Sign in to add a comment