-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 #6051 Deprecate keycode to code #6054
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
size-limit report 📦
|
This reverts commit 7fe6504.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this is correct but the size regression of including all the strings as opposed to numbers is noticeable (comparable to the discussion we had around coalescent operator). I also don't think the deprecated API is going away anytime soon, just like everyone uses document.execCommand
. But it would also help toward the task assigned...
Will leave it open for a bit to see if others have any opinions on this
For historical reference (since I know we're already fixing this in #6110): This breaks non-QWERTY layouts (Workplace: https://fb.workplace.com/groups/lexicaldiscussion/posts/1950653992035669/) and the numpad enter key (https://fb.workplace.com/groups/lexicaldiscussion/posts/1950753535359048/), because the web platform assumes a QWERTY layout:
Probably safer to use |
Description
Replace .keyCode with .code to follow new MDN API
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode#browser_compatibility
Closes: #6051