Skip to content

Write Mode: Non-overridden synced pattern content is editable #66424

@talldan

Description

@talldan

Description

(This is the issue that the PR #65408 was intended to solve, but it was reverted due to a performance issue)

Usually synced pattern content is only editable when a block has pattern overrides enabled.

In Write Mode though, all pattern content is editable regardless of overrides.

The bug happens because the getBlockEditingMode changes the editing mode of pattern inner blocks when in Write Mode, whereas usually the pattern block sets the editing of its inner blocks mode itself.

Step-by-step reproduction instructions

  1. Insert a synced pattern with a mixture of overridden an non-overridden content blocks
  2. Try editing various blocks
  3. Observe that non-overridden blocks can't be edited
  4. Enable Write Mode
  5. Now observe that non-overriden blocks can be edited

Screenshots, screen recording, code snippet

No response

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions