Autocomplete: Cursor position lost when clicking to insert item #50168
Labels
[Feature] Inserter
The main way to insert blocks using the + button in the editing interface
[Feature] Rich Text
Related to the Rich Text component that allows developers to render a contenteditable
Needs Technical Feedback
Needs testing from a developer perspective.
[Type] Bug
An existing feature does not function as intended
Description
Using a custom autocompleter the cursor position is sometimes lost when inserting an item.
If you use your mouse to click on an autocomplete item, the item inserts as expected, but the cursor position is lost and you can't continue typing until you click back into the block.
If you use keyboard controls to insert the item instead, the cursor position is kept as expected.
Step-by-step reproduction instructions
Tried to narrow down to a basic example it can be found here
https://codesandbox.io/p/sandbox/amazing-kilby-pl9v09
#
character to bring up the autocompleterScreenshots, screen recording, code snippet
Example code can be found here
https://codesandbox.io/p/sandbox/amazing-kilby-pl9v09
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: