We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In onKeyDown handler by default there is a check for event.code property (https://github.com/uiwjs/react-textarea-code-editor/blob/main/src/shortcuts.ts#L7), but this property was added to event only in React v17 (https://blog.saeloun.com/2021/04/23/react-keyboard-event-code.html). Before that we can get it via event.nativeEvent.code accessor. In peerDependencies you have "react": ">=16.9.0" (https://github.com/uiwjs/react-textarea-code-editor/blob/main/package.json#L66), so maybe it is better to extend check in shortcuts method? Something like that:
onKeyDown
event.code
event.nativeEvent.code
peerDependencies
"react": ">=16.9.0"
shortcuts
const code = event.code || event.nativeEvent.code;
The text was updated successfully, but these errors were encountered:
fix: Support of shortcuts for React v16 (#128)
b46612f
Great job, thank you!
Sorry, something went wrong.
released v2.0.3 (#128)
6343ea7
@Pareder Upgrade v2.0.3
v2.0.3
v2.0.3 released v2.0.3 (#128) 6343ea7
3e385ab
No branches or pull requests
In
onKeyDown
handler by default there is a check forevent.code
property (https://github.com/uiwjs/react-textarea-code-editor/blob/main/src/shortcuts.ts#L7), but this property was added to event only in React v17 (https://blog.saeloun.com/2021/04/23/react-keyboard-event-code.html). Before that we can get it viaevent.nativeEvent.code
accessor. InpeerDependencies
you have"react": ">=16.9.0"
(https://github.com/uiwjs/react-textarea-code-editor/blob/main/package.json#L66), so maybe it is better to extend check inshortcuts
method? Something like that:The text was updated successfully, but these errors were encountered: