Skip to content

Insert Link: Pasting text removes link #11571

Closed

Description

@swissspidy

Describe the bug

When pasting text in the middle of a link, the link is partially removed.

This makes it impossible to quickly change the link text via copy/paste.

To Reproduce
Steps to reproduce the behavior:

  1. Write something like ABCD and add a link to it.
  2. Paste some letters like XYZ into the middle of the link
  3. You'll end up with ABXYZCD, where AB and CD are still links, XYZ however is no link.

Expected behavior

Pasting the text does not partially remove the link.

Screenshots

Here's a gif showing the problem:
linky linky

Desktop (please complete the following information):

Chrome 70 on macOS.

Additional context
Gutenberg 4.1.1 on WordPress 4.9.8

Activity

  1. added
    [Type] Bug
    [Feature] UI Components
    Needs Testing
    on Nov 7, 2018
  2. designsimply commented on Nov 7, 2018

    @designsimply
    Member

    Good find. Testing note: let's check a couple different browsers for this one.

  3. added
    [Feature] Rich Text
    on Nov 21, 2018
  4. sourourn commented on Nov 22, 2018

    @sourourn

    Was able to reproduce this issue on Firefox (61.0.2) on MacOS
    Gutenberg version: 4.5.1
    WordPress version: 4.9.8

  5. dromero20 commented on Nov 22, 2018

    @dromero20

    I tested this out by reproducing the steps and I can confirm it's happening. One quick note: it only happens when you're pasting something in the middle of the link, if you writing something "manually", the link doesn't break.

    Tested in Firefox 63.0.1 (64-bit).
    Gutenberg: 4.5.1
    WordPress: 4.9.8

  6. self-assigned this
    on Nov 26, 2018
  7. removed
    Needs Testing
    [Feature] UI Components
    on Jan 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Feature] Rich Text[Type] Bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions