From 967113377203c8be931daf23d3ad7d85b4b87482 Mon Sep 17 00:00:00 2001 From: Dave Smith <getdavemail@gmail.com> Date: Mon, 16 Dec 2024 12:21:41 +0000 Subject: [PATCH 1/2] Allow replace operation on empty default block in Zoom Out --- .../src/components/use-block-drop-zone/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/use-block-drop-zone/index.js b/packages/block-editor/src/components/use-block-drop-zone/index.js index 221e5ab74ebb2e..b2ecda848e613c 100644 --- a/packages/block-editor/src/components/use-block-drop-zone/index.js +++ b/packages/block-editor/src/components/use-block-drop-zone/index.js @@ -456,7 +456,15 @@ export default function useBlockDropZone( { const [ targetIndex, operation, nearestSide ] = dropTargetPosition; - if ( isZoomOut() && operation !== 'insert' ) { + const isTargetIndexEmptyDefaultBlock = + operation === 'replace' && + blocksData[ targetIndex ]?.isUnmodifiedDefaultBlock; + + if ( + isZoomOut() && + ! isTargetIndexEmptyDefaultBlock && + operation !== 'insert' + ) { return; } From bc2c59418cca23a9a3c836634efbb6b763fba849 Mon Sep 17 00:00:00 2001 From: Dave Smith <getdavemail@gmail.com> Date: Mon, 16 Dec 2024 16:03:34 +0000 Subject: [PATCH 2/2] Remove operation type from conditional check --- .../block-editor/src/components/use-block-drop-zone/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/block-editor/src/components/use-block-drop-zone/index.js b/packages/block-editor/src/components/use-block-drop-zone/index.js index b2ecda848e613c..529eb199fb76a0 100644 --- a/packages/block-editor/src/components/use-block-drop-zone/index.js +++ b/packages/block-editor/src/components/use-block-drop-zone/index.js @@ -457,7 +457,6 @@ export default function useBlockDropZone( { dropTargetPosition; const isTargetIndexEmptyDefaultBlock = - operation === 'replace' && blocksData[ targetIndex ]?.isUnmodifiedDefaultBlock; if (