WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
8150
Click is registered only if mouse pointer is fully stationary while mouse button is down (except for link and button)
https://bugs.webkit.org/show_bug.cgi?id=8150
Summary
Click is registered only if mouse pointer is fully stationary while mouse but...
Aapo Laitinen
Reported
2006-04-03 00:15:21 PDT
The click event handler attached to an element such as a table cell or a paragraph will fire only if the mouse pointer remains perfectly stationary while the mouse button is held down. However, click event handlers attached to links and buttons are fired even if the mouse moves a bit while the button is down. It is very easy to move the mouse a couple of pixels while clicking. Not having any allowance at all makes Safari seem unresponsive. All elements should have at least some degree of allowance in regards to detecting clicks. For consistency, it might be best if they were very liberal in this regard, like buttons. Strictly speaking the current behaviour is according to the standards: "A click is defined as a mousedown and mouseup over the same screen location."
http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-eventgroupings-mouseevents
However, it is clear that being overly strict here is bad for usability and accessibility, not to mention inconsistent. Mozilla and Opera have thus chosen ignore this bit. The workaround is to simulate the click event with mousedown and mouseup. Tested in nightly that was downloaded on 2006-04-03. Attaching a test case.
Attachments
Test case
(1.42 KB, text/html)
2006-04-03 00:15 PDT
,
Aapo Laitinen
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Aapo Laitinen
Comment 1
2006-04-03 00:15:57 PDT
Created
attachment 7480
[details]
Test case
Alexey Proskuryakov
Comment 2
2006-05-03 06:29:31 PDT
Yes, onclick is called in Mozilla an WinIE as long as mousedown and mouseup are in the same object, regardless of how much the mouse pointer has moved. Of course, they don't agree on what to do with drag&drop or when the two objects have parent-child relationship.
Darin Adler
Comment 3
2007-01-26 09:35:29 PST
The patch for
bug 12133
resolved part of this problem. We should make a layout test so it doesn't regress, and fix the third case cited in this bug too.
Ahmad Saleem
Comment 4
2023-10-21 03:30:24 PDT
I am able to click all three and also few pixels away before releasing mouse. @Alexey - Is it reproducible to you? CCing - Abrar as well, since he is recently doing lot of work on event handling.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug