matchMedia("(hover")).matches returns a wrong value
Reported by
hike...@mozilla.com,
Jan 3
|
|||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0
Steps to reproduce the problem:
Run 'window.matchMedia("(hover)").matches (or matchMedia("(hover:hover)") on a device with a hover-capable pointing device (i.e. a mouse).
The result should be true
What is the expected behavior?
What went wrong?
On my Linux box, it returns false.
Did this work before? N/A
Does this work in other browsers? Yes
Chrome version: 71.0.3578.80 Channel: n/a
OS Version:
Flash Version:
The media queries work fine in @media rules, see https://hiikezoe.github.io/interaction-media-features.html
,
Jan 3
Hmm, this works on my Linux box, the matchMedia calls return true in both 71.0.3578.98 and 73.0.3642.0. It's quite surprising that the results would differ from the @media rule. Are you sure you don't have mobile emulation enabled while you have DevTools open?
,
Jan 4
Oh right. When I did run the window.matchMedia I used the DevTools and I totally forgot that I've been using the Responsive Design Mode there (for Mozilla bug 1423013), and I did open the html on GitHub in normal tab. I am sorry for confusing. Would you mind closing this bug? I can't find the way to close this.
,
Jan 4
As per comment# 3 from the reporter, closing the issue and marking it as Won't fix. Thanks! |
|||
►
Sign in to add a comment |
|||
Comment 1 by swarnasree.mukkala@chromium.org
, Jan 3