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

event.keyCode is deprecated #2096

Open
justin-lyon opened this issue May 21, 2024 · 0 comments
Open

event.keyCode is deprecated #2096

justin-lyon opened this issue May 21, 2024 · 0 comments

Comments

@justin-lyon
Copy link

justin-lyon commented May 21, 2024

Cleanup

What should be cleaned up or changed:
Vue Test Utils trigger does not conform with keyboard event attributes. For the statement wrapper.find('input').trigger('keyup.down') a keyboard event is emitted but the key and code attributes are not properly mapped.

❌ (bad) vue test util console.logs of the two valid attributes key and code with the deprecated attribute keyCode
image

✅ (good) the same three console.logs in the browser
image

🗳️ I suggest conforming to the key and code attributes. keyCode is still out there and dropping support is unrealistic, but these new standards should be supported too.

Provide any links for context:
Vue Test Utils 3 - Form Handling
Vue Test Utils 2 - Testing Key, Mouse, and Other DOM Events
Mozilla Developer Network - Event keyCode

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

No branches or pull requests

1 participant