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 and ockham committed Oct 10, 2022
1 parent 5248dfe commit c54cfc1
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 @@ -144,7 +144,6 @@ const BlockInspector = ( { showNoBlockSelectedMessage = true } ) => {
getSelectedBlockCount,
getBlockName,
__unstableGetContentLockingParent,
getTemplateLock,
} = select( blockEditorStore );

const _selectedBlockClientId = getSelectedBlockClientId();
Expand All @@ -158,12 +157,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 c54cfc1

Please sign in to comment.