Skip to content

Commit

Permalink
Zoom Out: Don't hide the insertion point when hovering patterns (#64392)
Browse files Browse the repository at this point in the history
Co-authored-by: scruffian <scruffian@git.wordpress.org>
Co-authored-by: MaggieCabrera <onemaggie@git.wordpress.org>
  • Loading branch information
3 people authored Aug 9, 2024
1 parent 22e4cc2 commit 34b5219
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions packages/block-editor/src/components/inserter/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ function InserterMenu(

const onInsertPattern = useCallback(
( blocks, patternName ) => {
onToggleInsertionPoint( false );
onInsertBlocks( blocks, { patternName } );
onSelect();
},
Expand All @@ -123,13 +124,6 @@ function InserterMenu(
[ onToggleInsertionPoint, setHoveredItem ]
);

const onHoverPattern = useCallback(
( item ) => {
onToggleInsertionPoint( !! item );
},
[ onToggleInsertionPoint ]
);

const onClickPatternCategory = useCallback(
( patternCategory, filter ) => {
setSelectedPatternCategory( patternCategory );
Expand Down Expand Up @@ -176,7 +170,6 @@ function InserterMenu(
filterValue={ delayedFilterValue }
onSelect={ onSelect }
onHover={ onHover }
onHoverPattern={ onHoverPattern }
rootClientId={ rootClientId }
clientId={ clientId }
isAppender={ isAppender }
Expand All @@ -199,7 +192,6 @@ function InserterMenu(
delayedFilterValue,
onSelect,
onHover,
onHoverPattern,
shouldFocusBlock,
clientId,
rootClientId,
Expand Down Expand Up @@ -249,7 +241,6 @@ function InserterMenu(
<PatternCategoryPreviews
rootClientId={ destinationRootClientId }
onInsert={ onInsertPattern }
onHover={ onHoverPattern }
category={ selectedPatternCategory }
patternFilter={ patternFilter }
showTitlesAsTooltip
Expand All @@ -259,7 +250,6 @@ function InserterMenu(
);
}, [
destinationRootClientId,
onHoverPattern,
onInsertPattern,
onClickPatternCategory,
patternFilter,
Expand Down

0 comments on commit 34b5219

Please sign in to comment.