Autocomplete: use KeyboardEvent.code instead of KeyboardEvent.keyCode#43432
Conversation
|
Size Change: -38 B (0%) Total Size: 1.24 MB
ℹ️ View Unchanged
|
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
Autocompletecomponent to rely oncodeinstead ofkeyCodefor keyboard eventsWhy?
keyCodeis deprecated, and replaced bycodeHow?
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