Skip to content

Block Editor: Improve UX for the URL link viewer #17972

@gziolo

Description

@gziolo

Follow-up for #17928 where @glendaviesnz fixed the root issue of #17657:

Block disappear when clicking on a link (anchor, ) with no href

Before:

before

After:

after

One option to improve the UX is to:

I tested it with the Class block and it looks like the way it's handled there is, it gets never converted into a link if you leave the input field empty. In the case where you remove the URL and save it, it works as if you would remove the link. We should replicate the same behavior.

To reproduce

  1. Copy text from a source where there is a tag with no href
    or
    create a link with no href when editing a block in HTML mode
  2. In visual mode, click on the link or drag over it (like when you want to select text containing a anchor with no href).
  3. Check how popover behaves.

Metadata

Metadata

Assignees

Labels

[Feature] Link EditingLink components (LinkControl, URLInput) and integrations (RichText link formatting)[Package] Block editor/packages/block-editor[Status] In ProgressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions