From c5f3dd50867543cd08889f79627bbbac18a096c4 Mon Sep 17 00:00:00 2001 From: Jerry Jones Date: Wed, 24 Jul 2024 04:10:38 -0500 Subject: [PATCH] Don't automatically show inserter when zoom out mode initiates (#63859) Co-authored-by: jeryj Co-authored-by: scruffian --- .../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( () => {