Skip to content

Pattern Overrides Experiment: Block toolbar items duplicated when duplicating a pattern #57502

@talldan

Description

@talldan

Description

When following a specific set of steps to duplicate a pattern, you can end up with weird issues with multiple block toolbar icons.

This kind of issue has been seen before, and usually happens when multiple instances of blocks are sharing the same client ids.

Step-by-step reproduction instructions

  1. Open the post editor, add a couple of paragraphs, and create a pattern from them
  2. Click the Edit Original button from the toolbar of the pattern block
  3. Enable Pattern Overrides for the paragraphs within the Advanced section of the block settings
  4. Use the back button in the editor header area (important that you don't use the browser back button here) to go back to editing the post
  5. Duplicate the pattern
  6. Select a paragraph within the pattern

Expected: The block toolbar is normal.
Actual: The block toolbar is duplicated. List view shows the same inner block selected across both instances of the pattern.

Note - the issue goes away after reloading, so it's important when testing that you don't reload the browser.

Screenshots, screen recording, code snippet

Screenshot 2024-01-03 at 5 50 13 pm

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] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsynced[Status] In ProgressTracking issues with work in progress[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