Unexpected pointer media exposed in Mobile (no touch) Responsive mode.
Reported by
bruno.ra...@gmail.com,
Oct 5 2016
|
|||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36
Steps to reproduce the problem:
1. View a page in Mobile (no touch) Responsive Mode
2. Run window.matchMedia("(pointer: any-hover").matches in console
3. Run window.matchMedia("(hover: hover").matches
What is the expected behavior?
Given that there is in fact a mouseover behavior in that mode unlike the touch mode. At least one of these two should be exposed and return true.
What went wrong?
In this mode you now have the two (pointer:coarse) and (hover:on-demand) enabled. Which is fine to emulate say a touch device in a google bot fashion assuming an automated bot. However there has to a hover to reflect the current testing environment in that mode.
Did this work before? N/A
Chrome version: 53.0.2785.143 Channel: n/a
OS Version: OS X 10.10.5
Flash Version:
Essentially, coarse is a secondary input in this context. So instead it'd be more accurate to expose any-pointer:coarse, any-pointer:hover, pointer:fine, any-pointer:hover and hover: hover.
If you can't expose any-* as I see the other mode don't have them. A better compromise in Mobile (no touch) would just be pointer:coarse and changing hover:on-demand with hover:hover if possible. Thanks.
,
Oct 7 2016
Tested on Mac OS X 10.11.6 with Chrome Stable 53.0.2785.143 and observed the following:
1. Opened sample page Google in responsive mode.
2. Executed "window.matchMedia("(pointer: any-hover").matches" and "window.matchMedia("(hover: hover").matches" on console .
3. Got result as "False"
Attached screen cast for the reference. Could you please confirm , whether this is the correct procedure followed and if it is the same issue that you have faced.
Thank You !
,
Oct 7 2016
Right, that's correct. I just forgot to mention the 'false' results in clear terms. Please note however, that there are 4 responsive modes: "Mobile (no touch)" Responsive Mode is for my first comment. The second observation is for the "Desktop (touch)" context. Pointer Media queries were manually customized for each of all four modes. But fairly incorrectly for those two specific modes to match the expected simulated environment.
,
Oct 7 2016
Tested the following scenario:
Changed the responsive mode to "laptop with touch" and executed the following commands:
window.matchMedia("(pointer: any-hover").matches result is "false"
window.matchMedia("(hover: hover").matches result is "true"
Could you please confirm is this the same as the issue you faced. If you can provide us screen cast , that would be helpful for us to triage the issue in a better way.
Thank You !
,
Oct 7 2016
No. There is no 'laptop with touch' by default in Chrome 53 that I can see. I don't know know where you get this. Let me reiterate the repro step by step in details. On a non-touchscreen desktop computer: 1. Open http://www.hexanet.com/test/nav.htm in responsive mode. 2. Enable "add device type". See snapshots. 3. Then select "Mobile (no touch)" Responsive Mode 4. Reload the page. 5. Execute "window.matchMedia("(pointer: any-hover").matches" and "window.matchMedia("(hover: hover").matches" in console . 6. Both are "false". Now if you move your mouse over BUTTON+LINK, it will trigger a hover. Therefore at least window.matchMedia("(pointer: any-hover").matches should be true.
,
Oct 10 2016
,
Dec 1 2016
,
Aug 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/40188e38e26f3e3dab90524c9698dbfa1113c2f4 commit 40188e38e26f3e3dab90524c9698dbfa1113c2f4 Author: Dmitry Gozman <dgozman@chromium.org> Date: Thu Aug 17 02:00:25 2017 [DevTools] Make touch emulation, not mobile device emulation, affect hover/pointer MQs Bug: 530183 , 653285 Change-Id: I60457c5f784decf3a21c040b20a636c99017c411 Reviewed-on: https://chromium-review.googlesource.com/617417 Reviewed-by: Pavel Feldman <pfeldman@chromium.org> Commit-Queue: Dmitry Gozman <dgozman@chromium.org> Cr-Commit-Position: refs/heads/master@{#495049} [add] https://crrev.com/40188e38e26f3e3dab90524c9698dbfa1113c2f4/third_party/WebKit/LayoutTests/inspector-protocol/emulation/touch-emulation-expected.txt [add] https://crrev.com/40188e38e26f3e3dab90524c9698dbfa1113c2f4/third_party/WebKit/LayoutTests/inspector-protocol/emulation/touch-emulation.js [modify] https://crrev.com/40188e38e26f3e3dab90524c9698dbfa1113c2f4/third_party/WebKit/Source/core/exported/WebFrameTest.cpp [modify] https://crrev.com/40188e38e26f3e3dab90524c9698dbfa1113c2f4/third_party/WebKit/Source/core/inspector/DevToolsEmulator.cpp
,
Aug 21 2017
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by bruno.ra...@gmail.com
, Oct 5 2016