Skip to content

Commit

Permalink
Fix: Content blocks with nested blocks always appear as top level on …
Browse files Browse the repository at this point in the history
…content locking.
  • Loading branch information
jorgefilipecosta committed Sep 12, 2022
1 parent 77b940d commit 0d1c3dc
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/block-editor/src/components/block-inspector/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,9 @@ const BlockInspector = ( { showNoBlockSelectedMessage = true } ) => {
selectedBlockClientId: _selectedBlockClientId,
selectedBlockName: _selectedBlockName,
blockType: _blockType,
topLevelLockedBlock:
getTemplateLock( _selectedBlockClientId ) === 'noContent'
? _selectedBlockClientId
: __unstableGetContentLockingParent(
_selectedBlockClientId
),
topLevelLockedBlock: __unstableGetContentLockingParent(
_selectedBlockClientId
),
};
}, [] );

Expand Down

0 comments on commit 0d1c3dc

Please sign in to comment.