Skip to content

Inline Inserter can insert in wrong place depending on block selection and focus #24262

@glendaviesnz

Description

@glendaviesnz

Describe the bug

Clicking the inline inserter doesn't by default move the cursor to that spot in the document. This means that if you use the 'Browse all' option in the block list the new block may end up in the last place in the document that had focus instead of the position of the clicked inline inserter

To reproduce
Steps to reproduce the behavior:

  1. Open a new page and add column block with some content in each column
  2. Add some paragraph blocks under the columns
  3. While cursor is still in bottom paragraph click on the inline inserter in the column and use 'browse all' to select a block
  4. The block will be inserted at the bottom instead of in the column
  5. Click in the column again and make sure cursor is next to the inline insert and select another block via 'browse all'
  6. This time it should be inserted in the column

Expected behavior
Clicking the inline inserter should move the focus to that point so that using browse all will know the location for inserting new block.

Screenshots
browse-all

Editor version (please complete the following information):
Happens on 8.5.1 and 8.6.1

Metadata

Metadata

Assignees

Labels

[Feature] InserterThe main way to insert blocks using the + button in the editing interface[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions