mousemove event triggered with any mouse button press
Reported by
qdi...@gmail.com,
Jun 18 2018
|
|||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36 Steps to reproduce the problem: 1. Put a mousemove event listener on an element 2. Hover over the element 3. Press a button on your mouse without moving What is the expected behavior? Only the act of moving the mouse should trigger the mousemove event. What went wrong? The mousemove event is not exclusively triggered by moving the mouse. Clicking a button on the mouse also triggers the mousemove event. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 67.0.3396.87 Channel: stable OS Version: 10.0 Flash Version: Edge has a different issue that can cause it to throw an error when running my test case, but otherwise it's working fine; clicking does not cause it to throw. IE11 and Firefox seem to be working fine.
,
Jun 18 2018
,
Jun 19 2018
I want to document that the behavior of this has changed for me since yesterday. Hopefully anyone who plays around with my test case will be able to see that something is up. It's still pretty easy to get a misfire, but it's not misfiring for me in the same manner as before.
,
Jun 19 2018
qdirks@ Thanks for the issue. Tested this issue on Windows 10 on the reported version 67.0.3396.87 and the latest Canary 69.0.3465.0 by following the below steps. 1. Launched Chrome and navigated to the given html page. 2. Opened devtools -> Console and hover the mouse on the html page and clicked on the mouse button, but cannot see any mousemove event misfired logged in console. Attached is the screen cast for reference. Request you to check and update if anything is missed from our end in triaging the issue. And as per Comment #3, can you please confirm what is the expected behavior of this issue? Thanks..
,
Jun 20 2018
I have attached a video to demonstrate the bug I'm experiencing. Also attached is the page I used to demonstrate. I hope this will help. I confirm that the expected behavior is that the mousemove event is triggered exclusively with mouse movements and not button presses, i.e. the throw statement should never be executed.
,
Jun 20 2018
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jun 20 2018
Related to number 3 on my bug behaviors list: no misfire with ctrl+tab if you are moving your mouse.
,
Jun 21 2018
I can confirm the ctrl+tab scenario but not the other one. I assume we are sending a mousemove just to let the page know that the mouse is on top of it. However, I believe we can change this behavior a little bit. Ella, can we send that event with relativeMotionFlag on so it only sends the boundary events (i.e. mouseover/enter) and not the mousemove itself?
,
Jun 21 2018
The fake move events for updating hovers do have the relativeMotionFlag so it shouldn't be send to dom. For the ctrl+tab scenario, I suspect the event is coming from OS Windows doesn't have WM_MouseEnter event, looks like windows send an WM_Mousemove when mouse enter. Similarly, on other OS we treat the enter event as a move event. See Mac's here: https://cs.chromium.org/chromium/src/content/browser/renderer_host/input/web_input_event_builders_mac.mm?sq=package:chromium&g=0&l=312 I don't think there is good way to avoid sending the first move. Lan@, WDYT?
,
Jun 21 2018
For the ctrl_tab case, we cannot distinguish it from a real mouse move that enters a boundary. Maybe we can check the mouse coordinates with the last one to see if we should fire it.
,
Jul 30
won't fix based on #9 and #10. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by qdi...@gmail.com
, Jun 18 2018