Bug 26401 - mousemove event fired on click, even though the mouse does not move
Summary: mousemove event fired on click, even though the mouse does not move
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL: http://jsbin.com/iwige
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-15 03:44 PDT by simon
Modified: 2023-07-28 23:53 PDT (History)
6 users (show)

See Also:


Attachments
DRT test (408 bytes, text/html)
2011-08-15 10:31 PDT, Ryosuke Niwa
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description simon 2009-06-15 03:44:53 PDT
When you make a mouse click, the following events are fired (in order):

mousedown, mouseup, click, mousemove

even if the mouse has not moved.

Similarly, if you DO move the mouse between mousedown and mouseup, an extra mousemove event is fired after mouseup, so the events fired are

mousedown, mousemove, mouseup, mousemove
Comment 1 Michaël Villar 2010-06-19 08:22:43 PDT
I have a similar bug. I illustrated it here : http://michaelvillar.com/tmp/click_mousemove_bdc4.html

The mousemove event is fired after a click even if the mouse doesn't move.
Comment 2 Michaël Villar 2010-06-19 08:32:15 PDT
It appears it's working as expected in Chrome 5.0.375.70.
The problem still exists in Safari 5 and the latest Webkit nightly r61351
Comment 3 Ryosuke Niwa 2011-08-15 10:30:21 PDT
The bug appears to be in (void)mouseUp:(NSEvent *)event in WebHTMLView.mm.  It calls [self _updateMouseoverWithFakeEvent], which in turn fires mousemove event.
Comment 4 Ryosuke Niwa 2011-08-15 10:31:10 PDT
Created attachment 103923 [details]
DRT test
Comment 5 Alexey Proskuryakov 2011-08-15 10:37:59 PDT
See also: bug 16271, bug 34253.
Comment 6 kangax 2011-08-30 14:26:19 PDT
Similar issue in Chrome — http://code.google.com/p/chromium/issues/detail?id=5598