Adding code property to SyntheticKeyboardEvent with test#11325
Closed
flaviolivolsi wants to merge 1 commit intofacebook:masterfrom
Closed
Adding code property to SyntheticKeyboardEvent with test#11325flaviolivolsi wants to merge 1 commit intofacebook:masterfrom
code property to SyntheticKeyboardEvent with test#11325flaviolivolsi wants to merge 1 commit intofacebook:masterfrom
Conversation
aweary
suggested changes
Oct 22, 2017
Contributor
aweary
left a comment
There was a problem hiding this comment.
It looks like code is not yet standardized and doesn't have good browser support. If we can't polyfill this for all of the other browsers React supports we might want to just wait until the DOM Level 3 Events specification moves from a working draft to a recommendation.
aweary
reviewed
Oct 22, 2017
| // as closely as possible to what would happen with a physical keyboard, to maximize | ||
| // compatibility between physical and virtual input devices. | ||
| if (event.type === 'keydown' || event.type === 'keyup') { | ||
| return event.code; |
Contributor
There was a problem hiding this comment.
According to MDN, code isn't widely supported. Is there a way to cheaply polyfill this for those browsers?
Author
|
This is one polyfill I could find. Alas, nothing much else. |
Contributor
|
I'm assuming it would be a good idea to polyfill the ones we can universally detect as well, like we do for |
Collaborator
|
Closing as stale. |
This was referenced Dec 30, 2023
This was referenced Apr 5, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is about feature request #11306