From 5d054104fbe95c336087c1c8aef3ca1bc928acad Mon Sep 17 00:00:00 2001 From: Ella Date: Sat, 16 Dec 2023 22:16:49 +0100 Subject: [PATCH] InnerBlocks: overlay: remove viewport size condition --- packages/block-editor/src/components/inner-blocks/index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/block-editor/src/components/inner-blocks/index.js b/packages/block-editor/src/components/inner-blocks/index.js index cdabb348cca05..6461d57a7e604 100644 --- a/packages/block-editor/src/components/inner-blocks/index.js +++ b/packages/block-editor/src/components/inner-blocks/index.js @@ -6,7 +6,7 @@ import classnames from 'classnames'; /** * WordPress dependencies */ -import { useViewportMatch, useMergeRefs } from '@wordpress/compose'; +import { useMergeRefs } from '@wordpress/compose'; import { forwardRef, useMemo } from '@wordpress/element'; import { useSelect } from '@wordpress/data'; import { @@ -188,7 +188,6 @@ export function useInnerBlocksProps( props = {}, options = {} ) { layout = null, __unstableLayoutClassNames: layoutClassNames = '', } = useBlockEditContext(); - const isSmallScreen = useViewportMatch( 'medium', '<' ); const { __experimentalCaptureToolbars, hasOverlay, @@ -219,7 +218,7 @@ export function useInnerBlocksProps( props = {}, options = {} ) { const { hasBlockSupport, getBlockType } = select( blocksStore ); const blockName = getBlockName( clientId ); const enableClickThrough = - __unstableGetEditorMode() === 'navigation' || isSmallScreen; + __unstableGetEditorMode() === 'navigation'; const blockEditingMode = getBlockEditingMode( clientId ); const _parentClientId = getBlockRootClientId( clientId ); return { @@ -244,7 +243,7 @@ export function useInnerBlocksProps( props = {}, options = {} ) { __unstableIsWithinBlockOverlay( clientId ), }; }, - [ clientId, isSmallScreen ] + [ clientId ] ); const blockDropZoneRef = useBlockDropZone( {