Skip to content

Editing text for a URL edits another URL's text #40857

@twstokes

Description

@twstokes

Description

I have two URLs in the editor, URL A and URL B. When editing the text for URL B and clicking "ENTER" to commit the change, the change is applied to URL A instead.

I would expect the change to be applied to URL B.

Step-by-step reproduction instructions

  1. Start a new post and switch to the code editor
  2. Paste the following into the code editor
<!-- wp:list {"ordered":true} -->
<ol><li>(<a href="http://www.google.com" data-type="URL" data-id="http://www.google.com">example demo</a>)</li><li>(<a href="http://www.wordpress.org" data-type="URL" data-id="http://www.wordpress.org">example</a> demo)</li></ol>
<!-- /wp:list -->
  1. Exit the code editor

Expect to see:

image

  1. Click the "example" link on list item 2
  2. Click the pencil icon to edit it
  3. Update the text from "example" to "example demo"
  4. Click "Press ENTER to add this link"

Observe that list item 1's text has been edited and item 1 now reads "example demo demo".

image

Screenshots, screen recording, code snippet

Screen.Recording.2022-05-05.at.13.18.29.mov

Environment info

  • WordPress 5.9.3

  • Gutenberg 11.9

  • Theme: Twenty Twenty-One

  • Browsers: Chrome 100.0.4896 ARM, Safari 15.4

  • Desktop with macOS

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions