A "click" event should only occur if the mousedown and mouseup were in the same location
Categories
(Core :: SVG, defect)
Tracking
()
People
(Reporter: timmy, Unassigned)
References
()
Details
Attachments
(1 file, 1 obsolete file)
|
193 bytes,
image/svg+xml
|
Details |
Comment 1•20 years ago
|
||
| Reporter | ||
Comment 2•20 years ago
|
||
| Reporter | ||
Comment 3•20 years ago
|
||
Comment 4•20 years ago
|
||
| Reporter | ||
Comment 5•20 years ago
|
||
| Reporter | ||
Comment 6•20 years ago
|
||
Comment 7•18 years ago
|
||
Updated•18 years ago
|
Updated•17 years ago
|
Comment 8•13 years ago
|
||
Comment 10•4 years ago
|
||
The specification says: https://w3c.github.io/uievents/#events-mouseevent-event-order
Each implementation will determine the appropriate hysteresis tolerance, but in general SHOULD fire click and dblclick events when the event target of the associated mousedown and mouseup events is the same element with no mouseout or mouseleave events intervening, and SHOULD fire click and dblclick events on the nearest common inclusive ancestor when the associated mousedown and mouseup event targets are different.
So the mouse doesn't have to be in the same location.
Comment 11•4 years ago
|
||
Yes, it is. click event is designed and implemented for that usual web apps can take similar behavior as button widgets on native applications. E.g., dragging out from a button does not cancel to click it immediately. I.e., users can click it even after that if they move cursor into it and release the mouse button over it.
Therefore, web apps like mentioned in comment 9 need to handle mouse, touch and/or pointer events by themselves since they want custom behavior about considering the click/tab on same position. So if developers think that an event behavior does not make users happy on the their apps, I think that they should investigate it more whether the custom behavior won't make their users confused or will make them happier (in my experience, developers should be conservative against changing basic UI behavior for avoiding users confused) and whether the DOM tree structure is logically reasonable or not (e.g., using an element for different purpose from the intention when it's standardized may cause the other things complicated).
Anyway, current click event behavior is compatible between browsers, click event is a logical event (i.e., not device's physical event) and the behavior enough emulates native applications' behavior on each major OS. So we shouldn't change the behavior.
Description
•