diff --git a/packages/block-editor/src/components/block-settings-menu/block-settings-dropdown.js b/packages/block-editor/src/components/block-settings-menu/block-settings-dropdown.js index 4d43865a7f83a2..c8dbf7dad3f3d0 100644 --- a/packages/block-editor/src/components/block-settings-menu/block-settings-dropdown.js +++ b/packages/block-editor/src/components/block-settings-menu/block-settings-dropdown.js @@ -96,6 +96,7 @@ export function BlockSettingsDropdown( { const firstBlockClientId = blockClientIds[ 0 ]; const { firstParentClientId, + isZoomOutMode, onlyBlock, parentBlockType, previousBlockClientId, @@ -109,6 +110,7 @@ export function BlockSettingsDropdown( { getPreviousBlockClientId, getSelectedBlockClientIds, getBlockAttributes, + __unstableGetEditorMode, } = select( blockEditorStore ); const { getActiveBlockVariation } = select( blocksStore ); @@ -120,6 +122,7 @@ export function BlockSettingsDropdown( { return { firstParentClientId: _firstParentClientId, + isZoomOutMode: __unstableGetEditorMode() === 'zoom-out', onlyBlock: 1 === getBlockCount( _firstParentClientId ), parentBlockType: _firstParentClientId && @@ -291,7 +294,8 @@ export function BlockSettingsDropdown( { 'core/block-editor/insert-after', event ) && - canInsertDefaultBlock + canInsertDefaultBlock && + ! isZoomOutMode ) { event.preventDefault(); setOpenedBlockSettingsMenu( undefined ); @@ -301,7 +305,8 @@ export function BlockSettingsDropdown( { 'core/block-editor/insert-before', event ) && - canInsertDefaultBlock + canInsertDefaultBlock && + ! isZoomOutMode ) { event.preventDefault(); setOpenedBlockSettingsMenu( undefined ); @@ -347,7 +352,7 @@ export function BlockSettingsDropdown( { { __( 'Duplicate' ) } ) } - { canInsertDefaultBlock && ( + { canInsertDefaultBlock && ! isZoomOutMode && ( <> ) } - - { typeof children === 'function' - ? children( { onClose } ) - : Children.map( ( child ) => - cloneElement( child, { onClose } ) - ) } + { ! isZoomOutMode && ( + <> + + { typeof children === 'function' + ? children( { onClose } ) + : Children.map( ( child ) => + cloneElement( child, { + onClose, + } ) + ) } + + ) } { canRemove && (