From aa166ab8d830a3c198671062d7dc916708424d87 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Wed, 11 Oct 2023 12:38:39 +0100 Subject: [PATCH] Only handle rename UI if selected --- packages/block-editor/src/hooks/block-rename-ui.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/block-editor/src/hooks/block-rename-ui.js b/packages/block-editor/src/hooks/block-rename-ui.js index 6a98dcf2e2fad7..aec11a9b2c657e 100644 --- a/packages/block-editor/src/hooks/block-rename-ui.js +++ b/packages/block-editor/src/hooks/block-rename-ui.js @@ -189,13 +189,13 @@ function BlockRenameControl( props ) { export const withBlockRenameControl = createHigherOrderComponent( ( BlockEdit ) => ( props ) => { - const { clientId, name, attributes, setAttributes } = props; + const { clientId, name, attributes, setAttributes, isSelected } = props; const supportsBlockNaming = hasBlockSupport( name, 'renaming', true ); return ( <> - { supportsBlockNaming && ( + { isSelected && supportsBlockNaming && ( <>