From 119390c9ccfe01efc0e62e79c0faaa761f3dd2c8 Mon Sep 17 00:00:00 2001 From: Daniel Richards Date: Fri, 24 May 2024 12:03:35 +0800 Subject: [PATCH] Avoid showing lock icons when a parent block has blockEditingMode set to contentOnly --- packages/block-editor/src/store/selectors.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/block-editor/src/store/selectors.js b/packages/block-editor/src/store/selectors.js index 176c15557c8386..1c685eb4230ba4 100644 --- a/packages/block-editor/src/store/selectors.js +++ b/packages/block-editor/src/store/selectors.js @@ -1759,16 +1759,13 @@ export function canMoveBlock( state, clientId, rootClientId = null ) { if ( attributes === null ) { return true; } - if ( getBlockEditingMode( state, rootClientId ) !== 'default' ) { - return false; - } if ( attributes.lock?.move !== undefined ) { return ! attributes.lock.move; } if ( getTemplateLock( state, rootClientId ) === 'all' ) { return false; } - return true; + return getBlockEditingMode( state, rootClientId ) !== 'disabled'; } /**