From 1771212654add0fc6495535ad0ca78fd7cf07502 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Wed, 11 Oct 2023 14:42:59 +0100 Subject: [PATCH] Only handle rename UI if selected (#55250) --- 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 && ( <>