Skip to content

Adding a link url via copy/paste doesn't work on previously formatted text #63434

Closed

Description

Description

For some of my content I add a link to text and then bold it. Sometimes, I bold it first and then add the link.
For a while now I noticed that copy/page over a highlight text didn't always work, and I finally chased down the source of this "misbehavior"

If the text is formatted in bold, highlighting and adding the link via copy/paste doesn't work anymore. It does\work when using the link button, but that makes the process two clicks longer.

See below video for illustration.

Step-by-step reproduction instructions

  • Add a paragraph block with text.
  • Highlight a portion of the text
  • Format it in bold
  • Highlight the text again
  • copy/paste a URL. (use https://google.com or any other url)

Screenshots, screen recording, code snippet

Screen.Recording.2024-07-11.at.15.22.38.mov

Environment info

  • WordPress 6.6 RC3 (but it has been there for a while so it's not a WordPress 6.6 issue)
  • Gutenberg 18.7.1
  • Google Chrome Version 126.0.6478.127

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

[Feature] Link EditingLink components (LinkControl, URLInput) and integrations (RichText link formatting)Link components (LinkControl, URLInput) and integrations (RichText link formatting)[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn 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