Skip to content

Commit

Permalink
remove disconnected changes
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffian committed Jul 22, 2024
1 parent 2c26d65 commit d4f91a8
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions packages/block-editor/src/components/inner-blocks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,7 @@ import clsx from 'clsx';
* WordPress dependencies
*/
import { useMergeRefs } from '@wordpress/compose';
import {
forwardRef,
useMemo,
memo,
useState,
useEffect,
} from '@wordpress/element';
import { forwardRef, useMemo, memo } from '@wordpress/element';
import { useSelect } from '@wordpress/data';
import {
getBlockSupport,
Expand Down Expand Up @@ -192,7 +186,6 @@ export function useInnerBlocksProps( props = {}, options = {} ) {
__unstableDisableDropZone,
dropZoneElement,
} = options;

const {
clientId,
layout = null,
Expand Down Expand Up @@ -269,28 +262,15 @@ export function useInnerBlocksProps( props = {}, options = {} ) {
defaultLayout,
} = selected;

const [ isReady, setIsReady ] = useState( false );
// Defer the initial rendering to avoid the jumps due to the animation.
useEffect( () => {
const timeout = setTimeout( () => {
setIsReady( true );
}, 5000 );
return () => {
clearTimeout( timeout );
};
}, [] );

const blockDropZoneRef = useBlockDropZone( {
dropZoneElement,
rootClientId: clientId,
parentClientId,
isDropZoneDisabled,
} );

const ref = useMergeRefs( [
props.ref,
__unstableDisableDropZone ||
! isReady ||
isDropZoneDisabled ||
( layout?.isManualPlacement &&
window.__experimentalEnableGridInteractivity )
Expand Down

0 comments on commit d4f91a8

Please sign in to comment.