Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy/pasting a link from plain text causes autolinking to not work #57487

Closed
annezazu opened this issue Jan 2, 2024 · 3 comments · Fixed by #59063
Closed

Copy/pasting a link from plain text causes autolinking to not work #57487

annezazu opened this issue Jan 2, 2024 · 3 comments · Fixed by #59063
Assignees
Labels
[Feature] Paste [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@annezazu
Copy link
Contributor

annezazu commented Jan 2, 2024

Description

If you paste some text and a link from plain text into Gutenberg and then try to apply the link with a copy/paste onto the text itself, it fails and instead just replaces the text.

Step-by-step reproduction instructions

  1. Write some text with a link in plain text.
  2. Copy and paste it into a new post.
  3. Copy the link you added and paste it over the text.
  4. Notice it doesn't link and instead overwrites the text.

Screenshots, screen recording, code snippet

pasting.fail.mov

Environment info

  • WP 6.4.2
  • GB 17.3
  • TT4

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

@annezazu annezazu added [Type] Bug An existing feature does not function as intended [Feature] Paste labels Jan 2, 2024
@annezazu
Copy link
Contributor Author

annezazu commented Jan 2, 2024

@ellatrix might be of interest to you!

@youknowriad
Copy link
Contributor

I've tracked this down to a regression introduced here https://github.com/WordPress/gutenberg/pull/54301/files#r1439029813

@ellatrix
Copy link
Member

ellatrix commented Feb 7, 2024

The regression is caused by a change in order in #55195, which moved the linking transform after the isInternal check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Paste [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
No open projects
Status: Done
4 participants