opening the repro link with desktop safari or firefox<68
With that said, steps to reproduce are:
click the "click me" text with the primary button of your mouse
check the console output
click the "click me" text with the middle button of your mouse
check the console output
What is expected?
There should be a single entry in the console, for the click performed with the primary button — with text "You clicked something with mouse button 0".
What is actually happening?
There are two entries in the console, one for the click performed with the primary button — with text "You clicked something with mouse button 0" — and another for the middle button — with text "You clicked something with mouse button 1".
The click event should only be fired for the primary pointer button (i.e., when button value is 0, buttons value is 1). Secondary buttons (like the middle or right button on a standard mouse) MUST NOT fire click events. See auxclick for a corresponding event that is associated with the non-primary buttons.
Safari, however, does not care about what the specs say and fires the click event for secondary buttons, as evidenced by this bug. Until version 68, Firefox would do the same, as noted in this bug report and the release notes for that version.
I found these two issues [1, 2] on the Vue repo that relate to it, but they're more about normalizing behavior so that @click.middle and @click.right behave more as one would expect them to, rather than normalizing behavior to account for browser quirks that cause @click to behave as one wouldn't expect it to.
The text was updated successfully, but these errors were encountered:
@NavaneethVijay, I'm able to reproduce it in macOS 10.15.7 and Safari version 14.0.3 (15610.4.3.1.7, 15610). As is mentioned in the original description, it only happens on desktop Safari and Firefox < 68, and requires a mouse with a clickable scroll wheel.
feliperuiz commentedApr 12, 2021
Version
2.6.11
Reproduction link
https://codepen.io/feliperuiz/pen/MWJQPaR?editors=1011
Steps to reproduce
Reproducing this bug requires:
With that said, steps to reproduce are:
What is expected?
There should be a single entry in the console, for the click performed with the primary button — with text
"You clicked something with mouse button 0"
.What is actually happening?
There are two entries in the console, one for the click performed with the primary button — with text
"You clicked something with mouse button 0"
— and another for the middle button — with text"You clicked something with mouse button 1"
.The UI events specs state that:
Safari, however, does not care about what the specs say and fires the
click
event for secondary buttons, as evidenced by this bug. Until version 68, Firefox would do the same, as noted in this bug report and the release notes for that version.I found these two issues [1, 2] on the Vue repo that relate to it, but they're more about normalizing behavior so that
@click.middle
and@click.right
behave more as one would expect them to, rather than normalizing behavior to account for browser quirks that cause@click
to behave as one wouldn't expect it to.The text was updated successfully, but these errors were encountered: