diff --git a/packages/block-editor/src/components/block-list/block.js b/packages/block-editor/src/components/block-list/block.js index deef2d75386fd..c44705d3fb753 100644 --- a/packages/block-editor/src/components/block-list/block.js +++ b/packages/block-editor/src/components/block-list/block.js @@ -517,6 +517,7 @@ function BlockListBlockProvider( props ) { __unstableIsFullySelected, __unstableSelectionHasUnmergeableBlock, isBlockBeingDragged, + isDraggingBlocks, hasBlockMovingClientId, canInsertBlockType, getBlockRootClientId, @@ -594,7 +595,9 @@ function BlockListBlockProvider( props ) { blockEditingMode === 'disabled' && isBlockSubtreeDisabled( clientId ), isOutlineEnabled: outlineMode, - hasOverlay: __unstableHasActiveBlockOverlayActive( clientId ), + hasOverlay: + __unstableHasActiveBlockOverlayActive( clientId ) && + ! isDraggingBlocks(), initialPosition: _isSelected && __unstableGetEditorMode() === 'edit' ? getSelectedBlocksInitialCaretPosition() diff --git a/packages/block-editor/src/components/inner-blocks/index.js b/packages/block-editor/src/components/inner-blocks/index.js index 442f2568ce73d..1e073e37e91bf 100644 --- a/packages/block-editor/src/components/inner-blocks/index.js +++ b/packages/block-editor/src/components/inner-blocks/index.js @@ -197,10 +197,9 @@ export function useInnerBlocksProps( props = {}, options = {} ) { __unstableGetEditorMode, getTemplateLock, getBlockRootClientId, - __unstableIsWithinBlockOverlay, - __unstableHasActiveBlockOverlayActive, getBlockEditingMode, getBlockSettings, + isDraggingBlocks, } = unlock( select( blockEditorStore ) ); const { hasBlockSupport, getBlockType } = select( blocksStore ); const blockName = getBlockName( clientId ); @@ -219,15 +218,13 @@ export function useInnerBlocksProps( props = {}, options = {} ) { blockName !== 'core/template' && ! isBlockSelected( clientId ) && ! hasSelectedInnerBlock( clientId, true ) && - enableClickThrough, + enableClickThrough && + ! isDraggingBlocks(), name: blockName, blockType: getBlockType( blockName ), parentLock: getTemplateLock( parentClientId ), parentClientId, - isDropZoneDisabled: - blockEditingMode !== 'default' || - __unstableHasActiveBlockOverlayActive( clientId ) || - __unstableIsWithinBlockOverlay( clientId ), + isDropZoneDisabled: blockEditingMode !== 'default', defaultLayout, }; },