2.2.1
https://jsfiddle.net/nosferatu79/z1jhpewo/
click on the textarea with the right click of your mouse
it should add in the textarea the following text:
contextmenu
right
there is only the text:
contextmenu
Sorry, I'll try with a version >2.2.1,
Thank you
sorry, but in this updated version it doesn't work either:
https://jsfiddle.net/z1jhpewo/1/
@stefanonepa
sorry it's my fault
@stefanonepa
maybe u need mousedown event
https://javascript.info/mouse-events-basics
@Kingwl I'm not sure that this documentation is very reliable, because in the explanation here: https://javascript.info/mouse-events-basics#complex-events , it says that contextmenu is fired on mousedown (and in the example it didn't write contextmenu if you just mousdown the right button)...
In the other way it says that a click event is fired when mousedown is followed by by a mouseup... So it seems that
@click.right
should works, you do not agree?
@stefanonepa
https://www.w3.org/TR/uievents/#event-type-click
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. The click event MAY be preceded by the mousedown and mouseup events on the same element, disregarding changes between other node types (e.g., text nodes). Depending upon the environment configuration, the click event MAY be dispatched if one or more of the event types mouseover, mousemove, and mouseout occur between the press and release of the pointing device button. The click event MAY also be followed by the dblclick event.
@Kingwl thank you for the standard (even it's a bit foggy for me)
But how should I interpret or use the .right
of the "mouse button modifiers" (cf. https://vuejs.org/v2/guide/events.html#Mouse-Button-Modifiers)? Because with the @click.middle
it fire a click event... Maybe I should suggest to add some info in the official documentation?
Hmm maybe click.right
should be aliased into contextmenu
at compile time?
It would be a great!
Thank you @yyx990803 !
Most helpful comment
Hmm maybe
click.right
should be aliased intocontextmenu
at compile time?