diff --git a/packages/block-editor/src/components/block-drop-zone/index.js b/packages/block-editor/src/components/block-drop-zone/index.js index fc71ee0a0c7d2..e0a0d1060ce4f 100644 --- a/packages/block-editor/src/components/block-drop-zone/index.js +++ b/packages/block-editor/src/components/block-drop-zone/index.js @@ -111,8 +111,8 @@ class BlockDropZone extends Component { } render() { - const { isLocked, index } = this.props; - if ( isLocked ) { + const { isLockedAll, index } = this.props; + if ( isLockedAll ) { return null; } const isAppender = index === undefined; @@ -158,7 +158,7 @@ export default compose( withSelect( ( select, { rootClientId } ) => { const { getClientIdsOfDescendants, getTemplateLock, getBlockIndex } = select( 'core/block-editor' ); return { - isLocked: !! getTemplateLock( rootClientId ), + isLockedAll: getTemplateLock( rootClientId ) === 'all', getClientIdsOfDescendants, getBlockIndex, }; diff --git a/packages/block-editor/src/store/actions.js b/packages/block-editor/src/store/actions.js index 6915280885ad4..42d866c04b21d 100644 --- a/packages/block-editor/src/store/actions.js +++ b/packages/block-editor/src/store/actions.js @@ -298,7 +298,7 @@ export const moveBlocksUp = createOnMove( 'MOVE_BLOCKS_UP' ); * * @yields {Object} Action object. */ -export function* moveBlockToPosition( clientId, fromRootClientId, toRootClientId, index ) { +export function* moveBlockToPosition( clientId, fromRootClientId = '', toRootClientId = '', index ) { const templateLock = yield select( 'core/block-editor', 'getTemplateLock',