Skip to content

[Feature] Mouse event listener modifiers #3050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
edjroot opened this issue Jun 10, 2016 · 2 comments
Closed

[Feature] Mouse event listener modifiers #3050

edjroot opened this issue Jun 10, 2016 · 2 comments

Comments

@edjroot
Copy link

edjroot commented Jun 10, 2016

First of all, I'd like to thank everyone who has contributed to this absolutely wonderful library.

I was reading the docs on key modifiers (for example, @keyup.enter) and was wondering if it would be worth having the same kind of thing for mouse buttons. This would make handling much simpler since the same events that are available for the left button by default would be for the other ones as well without the need for repetitive checking in the JS code.

For instance:

<button @click.left="hello" @click.right="bye">Say hello or bye</button>
<div @mousedown.middle="drag">I'm draggable!</div>

The only possible "downside", I guess, is that @click.right would become a synonym for @contextmenu, but it doesn't sound that bad.

Is this viable?

Thanks in advance!

@edjroot edjroot changed the title Mouse event listener modifiers [Feature] Mouse event listener modifiers Jun 10, 2016
@zoomclub
Copy link

Yes, there is some good potential with the @event interface. Like the suggestions made and also had a question/suggestion along the same lines for an @stream interface here: vuejs/vue-rx#5

@Kingwl
Copy link
Member

Kingwl commented Mar 15, 2017

ping @posva

@znck znck closed this as completed Mar 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants