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.
,
May 31 2016
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 |
||
Comment 1 by lushnikov@chromium.org
, Apr 11 2016Status: Assigned (was: Unconfirmed)