Skip to content

Commit

Permalink
Hide Zoom Out inserter buttons when dragging (#65789)
Browse files Browse the repository at this point in the history
Co-authored-by: getdave <get_dave@git.wordpress.org>
Co-authored-by: talldan <talldanwp@git.wordpress.org>
Co-authored-by: richtabor <richtabor@git.wordpress.org>
  • Loading branch information
4 people authored and draganescu committed Oct 2, 2024
1 parent a502791 commit 9cd64c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/block-editor/src/components/block-tools/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function selector( select ) {
isTyping,
isSectionBlock,
getParentSectionBlock,
isDragging,
} = unlock( select( blockEditorStore ) );

const clientId =
Expand All @@ -56,6 +57,7 @@ function selector( select ) {
hasFixedToolbar: getSettings().hasFixedToolbar,
isTyping: isTyping(),
isZoomOutMode: isZoomOut,
isDragging: isDragging(),
};
}

Expand Down Expand Up @@ -254,7 +256,7 @@ export default function BlockTools( {
name="__unstable-block-tools-after"
ref={ blockToolbarAfterRef }
/>
{ isZoomOutMode && (
{ isZoomOutMode && ! isDragging && (
<ZoomOutModeInserters
__unstableContentRef={ __unstableContentRef }
/>
Expand Down

0 comments on commit 9cd64c0

Please sign in to comment.