diff --git a/packages/block-editor/src/components/inserter/menu.js b/packages/block-editor/src/components/inserter/menu.js index e0bc29d62e1b9a..52e4e3062e9024 100644 --- a/packages/block-editor/src/components/inserter/menu.js +++ b/packages/block-editor/src/components/inserter/menu.js @@ -109,6 +109,7 @@ function InserterMenu( const onInsertPattern = useCallback( ( blocks, patternName ) => { + onToggleInsertionPoint( false ); onInsertBlocks( blocks, { patternName } ); onSelect(); }, @@ -123,13 +124,6 @@ function InserterMenu( [ onToggleInsertionPoint, setHoveredItem ] ); - const onHoverPattern = useCallback( - ( item ) => { - onToggleInsertionPoint( !! item ); - }, - [ onToggleInsertionPoint ] - ); - const onClickPatternCategory = useCallback( ( patternCategory, filter ) => { setSelectedPatternCategory( patternCategory ); @@ -176,7 +170,6 @@ function InserterMenu( filterValue={ delayedFilterValue } onSelect={ onSelect } onHover={ onHover } - onHoverPattern={ onHoverPattern } rootClientId={ rootClientId } clientId={ clientId } isAppender={ isAppender } @@ -199,7 +192,6 @@ function InserterMenu( delayedFilterValue, onSelect, onHover, - onHoverPattern, shouldFocusBlock, clientId, rootClientId, @@ -249,7 +241,6 @@ function InserterMenu(