Open garykac opened 6 years ago
This algorithm should probably include DOMActivate
as well
I'm not sure mice can be separated from other pointing devices, given that click (and dblclick maybe??) apply to all of them. I know this spec doesn't define touch and pointer events, but someone needs to define what happens when you "click", including those, and this seems like the right place.
It'll also be interesting to note how this interacts with focus. The spec currently states:
The default action of the click event type varies based on the event target of the event and the value of the button or buttons attributes. Typical default actions of the click event type are as follows:
If the event target has associated activation behavior, the default action MUST be to execute that activation behavior (see §3.5 Activation triggers and behavior).
If the event target is focusable, the default action MUST be to give that element document focus.
Due to a historical quirk, the activation behavior is already in the event dispatch logic. (Although, I wonder if this correctly captures how it relates to the other events, like (pointer|touch)(down|up) or DOMActivate...). But the focus part is not, and any algorithmic description of clicking would need to include that---at which point?
This'll be really great to have written down :)
Draft algorithm for handling mouse clicks (doc in progress)
We need a algorithmic description of how mouse click events are fired.
auxclick
,click
,dblclick
See: https://w3c.github.io/uievents/#events-mouseevent-event-order