From c54cfc1a288cc4d74cda65930428fde1500ba702 Mon Sep 17 00:00:00 2001 From: Jorge Costa Date: Tue, 4 Oct 2022 15:06:30 +0100 Subject: [PATCH] Fix: Content blocks with nested blocks always appear as top level. (#44098) --- .../src/components/block-inspector/index.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/block-editor/src/components/block-inspector/index.js b/packages/block-editor/src/components/block-inspector/index.js index 178fffc611a52d..e9a0e0b85bdc7b 100644 --- a/packages/block-editor/src/components/block-inspector/index.js +++ b/packages/block-editor/src/components/block-inspector/index.js @@ -144,7 +144,6 @@ const BlockInspector = ( { showNoBlockSelectedMessage = true } ) => { getSelectedBlockCount, getBlockName, __unstableGetContentLockingParent, - getTemplateLock, } = select( blockEditorStore ); const _selectedBlockClientId = getSelectedBlockClientId(); @@ -158,12 +157,9 @@ const BlockInspector = ( { showNoBlockSelectedMessage = true } ) => { selectedBlockClientId: _selectedBlockClientId, selectedBlockName: _selectedBlockName, blockType: _blockType, - topLevelLockedBlock: - getTemplateLock( _selectedBlockClientId ) === 'contentOnly' - ? _selectedBlockClientId - : __unstableGetContentLockingParent( - _selectedBlockClientId - ), + topLevelLockedBlock: __unstableGetContentLockingParent( + _selectedBlockClientId + ), }; }, [] );