Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InnerBlocks: overlay: remove viewport size condition #57135

Merged
merged 1 commit into from Dec 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions packages/block-editor/src/components/inner-blocks/index.js
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