Skip to content

Commit

Permalink
Fix: Content blocks with nested blocks always appear as top level. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta authored Oct 4, 2022
1 parent b053f14 commit 15e099e
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/block-editor/src/components/block-inspector/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ const BlockInspector = ( { showNoBlockSelectedMessage = true } ) => {
getSelectedBlockCount,
getBlockName,
__unstableGetContentLockingParent,
getTemplateLock,
} = select( blockEditorStore );

const _selectedBlockClientId = getSelectedBlockClientId();
Expand All @@ -157,12 +156,9 @@ const BlockInspector = ( { showNoBlockSelectedMessage = true } ) => {
selectedBlockClientId: _selectedBlockClientId,
selectedBlockName: _selectedBlockName,
blockType: _blockType,
topLevelLockedBlock:
getTemplateLock( _selectedBlockClientId ) === 'contentOnly'
? _selectedBlockClientId
: __unstableGetContentLockingParent(
_selectedBlockClientId
),
topLevelLockedBlock: __unstableGetContentLockingParent(
_selectedBlockClientId
),
};
}, [] );

Expand Down

0 comments on commit 15e099e

Please sign in to comment.