Skip to content
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

fix(use-v-on-exact): Don't flag events with different key codes #904

Merged
merged 1 commit into from Aug 16, 2019

Conversation

cjpearson
Copy link
Contributor

This change modifies the use-v-on-exact rule so that it doesn't flag key handlers that are for different keys. For example, this should still cause a warning:

<input
          @keydown.tab="foo"
          @keydown.shift.tab="bar"/>

While code like this is fine:

<input
          @keydown.enter="foo"
          @keydown.shift.tab="bar"/>

I have a few instances of this in my code, and I don't believe it can cause any issues, but I may be mistaken. Please let me know what you think.

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

@kazupon kazupon merged commit ba68ae7 into vuejs:master Aug 16, 2019
@vue-bot
Copy link

vue-bot commented Aug 16, 2019

Hey @cjpearson, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants