-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Autocomplete: use KeyboardEvent.code instead of KeyboardEvent.keyCode #43432
Conversation
Size Change: -38 B (0%) Total Size: 1.24 MB
ℹ️ View Unchanged
|
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.
LGTM, only needs a rebase 🚀
Co-authored-by: Marin Atanasov <8436925+tyxla@users.noreply.github.com>
Hey there 👋 is there an issue tracking these changes related to the Thank you! |
@geriux could you please provide more information as to what broke? AFAIK there's not an issue, but these are the PRs in that direction on which we have worked so far:
|
Sure! On mobile, we pass I've already created a PR to include this for the RichText component on mobile, which fixes the Autocomplete (slash inserter).
Thanks! I'll check that list. |
This one was also a PR related to this work: I didn't imagine this work would cause issues on the native side, since |
No worries! I'll check those PRs to see if we need to update anything, thanks for sharing the list! |
What?
Refactor the
Autocomplete
component to rely oncode
instead ofkeyCode
for keyboard eventsWhy?
keyCode
is deprecated, and replaced bycode
How?
Easy swap of values
Testing Instructions
The autocomplete component can be tested in the block editor in rich text blocks (e.g. autocompleting a user after typing
@
) — in particular, the arrow keys, the enter key, and the escape keyMake sure that there are no regressions compared to how the component behaves on
trunk