Skip to content

LinkPicker: Should respect navigation link title if present #74005

@jeryj

Description

@jeryj

Description

When a navigation link does not have a url, but does have a title, the selection from the LinkPicker will overwrite the link's title instead of preserving it.

Step-by-step reproduction instructions

  1. Edit a navigation to have an empty link via the code editor view: <!-- wp:navigation-link {"label":"Empty Link"} /-->
  2. Select this block via the list view (selecting it on canvas opens the link ui popover on canvas)
  3. Use the Link Picker in the inspector sidebar to select a new link
  4. The title "Empty Link" will be overwritten by the selected page title.

Screenshots, screen recording, code snippet

Screen.Recording.2025-12-15.at.9.51.29.AM.mov

Environment info

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Link EditingLink components (LinkControl, URLInput) and integrations (RichText link formatting)[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions