diff --git a/packages/block-editor/src/components/block-toolbar/index.js b/packages/block-editor/src/components/block-toolbar/index.js
index 4dc53aae0afff..29726ea6e3d3d 100644
--- a/packages/block-editor/src/components/block-toolbar/index.js
+++ b/packages/block-editor/src/components/block-toolbar/index.js
@@ -127,9 +127,9 @@ const BlockToolbar = ( { hideDragHandle } ) => {
{ ! isMultiToolbar &&
isLargeViewport &&
blockEditingMode === 'default' && }
-
- { ( shouldShowVisualToolbar || isMultiToolbar ) &&
- blockEditingMode === 'default' && (
+ { ( shouldShowVisualToolbar || isMultiToolbar ) &&
+ blockEditingMode === 'default' && (
+
{ ! isMultiToolbar && (
@@ -142,8 +142,8 @@ const BlockToolbar = ( { hideDragHandle } ) => {
hideDragHandle={ hideDragHandle }
/>
- ) }
-
+
+ ) }
{ shouldShowVisualToolbar && isMultiToolbar && (
) }
diff --git a/packages/block-editor/src/components/block-tools/style.scss b/packages/block-editor/src/components/block-tools/style.scss
index cf38c9ee47de2..c55b8e651c2e7 100644
--- a/packages/block-editor/src/components/block-tools/style.scss
+++ b/packages/block-editor/src/components/block-tools/style.scss
@@ -121,6 +121,10 @@
}
}
+ &:has(.block-editor-block-toolbar:empty) {
+ display: none;
+ }
+
// on desktop and tablet viewports the toolbar is fixed
// on top of interface header