Skip to content

Navigation Block: Editing the label of block causes Add Link prompt to appear incorrectly #30163

@annezazu

Description

@annezazu

Description

If you add a Link Block to the navigation block, add a link, and then try to edit the label/text the "Add link" prompt shows up despite a link already being added. This makes it seem as though by deleting the label, you have also removed the link. cc @jasmussen since you're working on this!

Step-by-step reproduction instructions

  1. Add a navigation block
  2. Add a link block
  3. Add a link
  4. Edit the text of the link you added and fully remove the text.
  5. See "Add link" but confirm the link is already still added.

Expected behaviour

I expect the "Add link" prompt to say "Add text" or "Add label" since a link is already in place.

Actual behaviour

The "Add link" prompt shows up.

Screenshots or screen recording (optional)

navigation.block.mov

WordPress information

  • WordPress version: 5.7
  • Gutenberg version: 10.2.1
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? TT1 Blocks

Device information

  • Device: Desktop
  • Operating system: MacOS
  • Browser: Chrome 88

Metadata

Metadata

Assignees

Labels

[Block] NavigationAffects the Navigation Block[Status] In ProgressTracking issues with work in progress[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