Skip to content

Commit

Permalink
Update SiteTitle block to Fix isLink Toggle Behavior (#68295)
Browse files Browse the repository at this point in the history
* Update link reset logic in SiteTitle

* Fix condition for link value in SiteTitleEdit component

Co-authored-by: Sukhendu2002 <sukhendu2002@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: fabiankaegy <fabiankaegy@git.wordpress.org>
  • Loading branch information
4 people authored Dec 26, 2024
1 parent b7356af commit 4ad26e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/block-library/src/site-title/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,16 @@ export default function SiteTitleEdit( {
label={ __( 'Settings' ) }
resetAll={ () => {
setAttributes( {
isLink: false,
isLink: true,
linkTarget: '_self',
} );
} }
dropdownMenuProps={ dropdownMenuProps }
>
<ToolsPanelItem
hasValue={ () => isLink !== false }
hasValue={ () => ! isLink }
label={ __( 'Make title link to home' ) }
onDeselect={ () => setAttributes( { isLink: false } ) }
onDeselect={ () => setAttributes( { isLink: true } ) }
isShownByDefault
>
<ToggleControl
Expand Down

1 comment on commit 4ad26e1

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 4ad26e1.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12500976277
📝 Reported issues:

Please sign in to comment.