Skip to content

Selected blocks get deleted when creating a reusable block and pressing backspace key #36513

@fluiddot

Description

@fluiddot

Description

When creating a reusable block via selecting multiple blocks, pressing the backspace key when typing a name in the "Create Reusable block" dialog leads to deleting the selected blocks and therefore the dialog to disappear. This behavior makes it very difficult to create a reusable block as removing characters when setting a name is very common.

Step-by-step reproduction instructions

  1. Add multiple blocks to a post.
  2. Select multiple blocks.
  3. Click on the options button located in the toolbar (the three dots icon).
  4. Click on "Add to Reusable blocks" option.
  5. Select the Name input field.
  6. Type a name and press the backspace key.
  7. Observe that the selected blocks are deleted and the "Create Reusable block" dialog is closed.

Screenshots, screen recording, code snippet

reusable-block-backspace-bug.mp4

Environment info

  • Gutenberg: v11.8.3
  • Editing Toolkit: 3.19495
  • WP AMP: 2.0.5
  • CoBlocks: 2.10.1

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

Labels

[Block] BlockThe "Reusable Block" Block[Feature] Synced PatternsRelated to synced patterns (formerly reusable blocks)[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions