From d8d55b568ab112c271d8a4fcd81c62ee94353bfa Mon Sep 17 00:00:00 2001 From: Jerry Jones Date: Tue, 23 Jul 2024 09:35:29 -0500 Subject: [PATCH] Don't automatically show inserter when zoom out mode initiates --- .../block-tools/zoom-out-mode-inserters.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/packages/block-editor/src/components/block-tools/zoom-out-mode-inserters.js b/packages/block-editor/src/components/block-tools/zoom-out-mode-inserters.js index 5f5b0401b512e0..5d273a4f3f6d58 100644 --- a/packages/block-editor/src/components/block-tools/zoom-out-mode-inserters.js +++ b/packages/block-editor/src/components/block-tools/zoom-out-mode-inserters.js @@ -2,7 +2,7 @@ * WordPress dependencies */ import { useSelect } from '@wordpress/data'; -import { useEffect, useRef, useState } from '@wordpress/element'; +import { useEffect, useState } from '@wordpress/element'; /** * Internal dependencies @@ -50,17 +50,6 @@ function ZoomOutModeInserters() { }; }, [] ); - const isMounted = useRef( false ); - - useEffect( () => { - if ( ! isMounted.current ) { - isMounted.current = true; - return; - } - // reset insertion point when the block order changes - setInserterIsOpened( true ); - }, [ blockOrder, setInserterIsOpened ] ); - // Defer the initial rendering to avoid the jumps due to the animation. useEffect( () => { const timeout = setTimeout( () => {