Skip to content

Commit

Permalink
Only handle rename UI if selected (#55250)
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave authored Oct 11, 2023
1 parent 9e11bfc commit bd3ea87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-editor/src/hooks/block-rename-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 && (
<>
<BlockRenameControl
clientId={ clientId }
Expand Down

0 comments on commit bd3ea87

Please sign in to comment.