Open rr-codes opened 3 months ago
Thanks for the catch! The "since last event" part was added way before click
was a PointerEvent!!
Possible ways forwards for the spec:
click.button
. We already have a special case for click.target
after a released pointer, so should be fine?click.button
to be -1
because this field is redundant with the auxclick
event for non-primary buttons. This would be a breaking change IMO.Both Chrome and Firefox show zeroes for click.button
and click.buttons
.
I think we should special case click in the spec. We can't change the behavior. And worth to add a note why such special case.
According to the pointer events spec , a pointer event should have a button value of -1 if "Neither buttons nor touch/pen contact changed since last event".
However, this is inconsistent with the behavior of when the
click
event was a MouseEvent, where thebutton
property would return0
(for the primary button).Additionally, it says
which further seems to contradict the statement that
button
should be-1
if it hasn't changed.