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 and pull[bot] committed Apr 11, 2024
1 parent 9fd8026 commit 1771212
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 1771212

Please sign in to comment.