Skip to content

Commit

Permalink
Cover: Avoid content loss when the templateLock value is all or conte…
Browse files Browse the repository at this point in the history
…ntOnly (#45632)

* Cover: Avoid content loss when the templateLock value is all or contentOnly
* Add inline comment
  • Loading branch information
Mamaduka authored Nov 10, 2022
1 parent 0c556c8 commit 3373e97
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/block-library/src/cover/edit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ function CoverEdit( {
className: 'wp-block-cover__inner-container',
},
{
template: innerBlocksTemplate,
// Avoid template sync when the `templateLock` value is `all` or `contentOnly`.
// See: https://github.com/WordPress/gutenberg/pull/45632
template: ! hasInnerBlocks ? innerBlocksTemplate : undefined,
templateInsertUpdatesSelection: true,
allowedBlocks,
templateLock,
Expand Down

0 comments on commit 3373e97

Please sign in to comment.