Skip to content

Commit

Permalink
Use contentOnly locking for pattern block, remove hard-coded block ch…
Browse files Browse the repository at this point in the history
…eck in block inspector
  • Loading branch information
talldan committed May 2, 2024
1 parent edb7e4e commit af4d7fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ const BlockInspector = ( { showNoBlockSelectedMessage = true } ) => {
blockType: _blockType,
topLevelLockedBlock:
getContentLockingParent( _selectedBlockClientId ) ||
( getTemplateLock( _selectedBlockClientId ) === 'contentOnly' ||
_selectedBlockName === 'core/block'
( getTemplateLock( _selectedBlockClientId ) === 'contentOnly'
? _selectedBlockClientId
: undefined ),
};
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/block/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ function ReusableBlockEdit( {
} );

const innerBlocksProps = useInnerBlocksProps( blockProps, {
templateLock: 'all',
templateLock: 'contentOnly',
layout,
renderAppender: innerBlocks?.length
? undefined
Expand Down

0 comments on commit af4d7fe

Please sign in to comment.