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

Remove keyCode support in v-on #95

Merged
merged 2 commits into from
Dec 13, 2019
Merged

Remove keyCode support in v-on #95

merged 2 commits into from
Dec 13, 2019

Conversation

yyx990803
Copy link
Member

@yyx990803 yyx990803 commented Nov 8, 2019

  • Drop support for using numbers (keyCodes) as v-on modifiers
  • Remove config.keyCodes

KeyboardEvent.keyCode has been deprecated and we already have support for using KeyboardEvent.key as modifiers.

Rendered

@yyx990803 yyx990803 added 3.x This RFC only targets 3.0 and above breaking change This RFC contains breaking changes or deprecations of old API. core labels Nov 8, 2019
@Meekohi
Copy link

Meekohi commented Nov 8, 2019

(edit: sorry was looking at .code instead of .key)

Browser support for .key: https://caniuse.com/#feat=keyboardevent-key

@leopiccionia
Copy link

leopiccionia commented Nov 9, 2019

KeyboardEvent.key may often return values that aren't template-friendly, like ., =, >, etc. I can't imagine common cases where those would be handy, though. On the worst hypothesis, one can check the key inside event handler.

An exception would be the space bar ( ), that even gained a "named" modifier in 2.x (.space). Will "named" 2.x modifiers like this be kept? Some of them (.esc, the four arrows) have non-standard keys in IE11, according to MDN.

@yyx990803
Copy link
Member Author

@leopiccionia yes, 2.x built-in aliases will be kept.

@yyx990803 yyx990803 changed the title Drop keyCode support Remove keyCode support in v-on Nov 14, 2019
@yyx990803
Copy link
Member Author

This RFC is now in final comments stage. An RFC in final comments stage means that:

The core team has reviewed the feedback and reached consensus about the general direction of the RFC and believe that this RFC is a worthwhile addition to the framework.
Final comments stage does not mean the RFC's design details are final - we may still tweak the details as we implement it and discover new technical insights or constraints. It may even be further adjusted based on user feedback after it lands in an alpha/beta release.
If no major objections with solid supporting arguments have been presented after a week, the RFC will be merged and become an active RFC.

@yyx990803 yyx990803 added the final comments This RFC is in final comments period label Nov 29, 2019
@yyx990803 yyx990803 merged commit d9ae979 into master Dec 13, 2019
@yyx990803 yyx990803 added feature removal feat: template syntax Changes related to template syntax feat: global api Changes related to global API feat: directives Changes related to directives and removed final comments This RFC is in final comments period feat: template syntax Changes related to template syntax labels Jul 1, 2020
@bencodezen bencodezen mentioned this pull request Jul 6, 2020
25 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x This RFC only targets 3.0 and above breaking change This RFC contains breaking changes or deprecations of old API. core feat: directives Changes related to directives feat: global api Changes related to global API feature removal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants