Skip to content

Commit

Permalink
InnerBlocks: overlay: remove viewport size condition
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Dec 16, 2023
1 parent a251666 commit 5d05410
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/block-editor/src/components/inner-blocks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -188,7 +188,6 @@ export function useInnerBlocksProps( props = {}, options = {} ) {
layout = null,
__unstableLayoutClassNames: layoutClassNames = '',
} = useBlockEditContext();
const isSmallScreen = useViewportMatch( 'medium', '<' );
const {
__experimentalCaptureToolbars,
hasOverlay,
Expand Down Expand Up @@ -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 {
Expand All @@ -244,7 +243,7 @@ export function useInnerBlocksProps( props = {}, options = {} ) {
__unstableIsWithinBlockOverlay( clientId ),
};
},
[ clientId, isSmallScreen ]
[ clientId ]
);

const blockDropZoneRef = useBlockDropZone( {
Expand Down

0 comments on commit 5d05410

Please sign in to comment.