-
Notifications
You must be signed in to change notification settings - Fork 251
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
onKeyDown charCode/keyCode/which is 0 #842
Comments
We removed support for deprecated features, as we neither want to maintain features that nobody should use, nor want to encourage their usage. |
That's perfectly understandable. Thanks. |
@ph-fritsche What does it mean that you should use KeyboardEvent.code instead, does that mean use the keyboard('[Enter]') bracket syntax? i also have this discussion question out: |
0.2 breaks Storybook testing because of the update to testing-library v14, which [removes support](testing-library/user-event#842 (comment)) for `keyCode`, `charCode`, and `which`. Blueprint has moved to key names, but in [v5 only](https://github.com/palantir/blueprint/pull/6106/files#diff-fec59d61737971c807d9d0b765c8d0c3ba1d1f1880cdd4b3a652ab0789d016db). Since Roam is using v3, the extension has to follow.
@testing-library/user-event
version: a5ca2e4Problem description
Adding the following test to
src/keyboard/keyboardAction.ts
yields the error
Testing only
[Enter]
yields the same error. Found this while having trouble with my tests because UI relies on thecharCode
ofkeydown
events. Expected?The MDN docs on
keyDown
hint at the fact that codes should be present, but I do not know the specs. Missing implementation? I can help with providing a fix.Suggested solution
Some patch was made to
keypress
to fix a similar issue (see 55e194a).Similar patch should probably be made to
keyup
andkeydown
too, although the key mapping is not the same.The text was updated successfully, but these errors were encountered: