-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
[Feature] InserterThe main way to insert blocks using the + button in the editing interfaceThe main way to insert blocks using the + button in the editing interface[Feature] Rich TextRelated to the Rich Text component that allows developers to render a contenteditableRelated to the Rich Text component that allows developers to render a contenteditable[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
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
- Go to https://pl9v09-3000.csb.app/
- Click to type in the paragraph block
- Type the
#
character to bring up the autocompleter - Use your mouse to click on one of the items
- Notice the cursor is not positioned at the end of the inserted item as expected
Screenshots, 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
Metadata
Metadata
Assignees
Labels
[Feature] InserterThe main way to insert blocks using the + button in the editing interfaceThe main way to insert blocks using the + button in the editing interface[Feature] Rich TextRelated to the Rich Text component that allows developers to render a contenteditableRelated to the Rich Text component that allows developers to render a contenteditable[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended