Make WordPress Core

Opened 15 months ago

Closed 2 months ago

#59162 closed defect (bug) (wontfix)

Link not completely deleted in Firefox

Reported by: dawasi's profile dawasi Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: TinyMCE Keywords: needs-patch
Focuses: Cc:

Description (last modified by sabernhardt)

Steps to reproduce

  1. Create a new page
  2. Insert a classic editor block
  3. Enter "Link1" and "Link2" in separate paragraphs and link them to https://link1.tld and https://link2.tld. The resulting code should look like this:
    <p><a href="https://link1.tld">Link1</a></p>
    <p><a href="https://link2.tld">Link2</a></p>
    
  4. Click on "Save" to close the block and reopen it afterwards
  5. Start by marking the word "Link1" from the back, without clicking in the word first.
  6. Press the Delete key on the keyboard. The text will be deleted, but the link will remain.
  7. Press the Delete key again. The empty line will be deleted and the previously not completely deleted link will be applied to the text "Link2". Thus, Link2 no longer points to https://link2.tld but https://link1.tld.

Expected result
Link is completely deleted in step 6.

Affected browsers
Firefox (tested in version 116 on Windows 10 and 11)

Test environment
WordPress 6.3 with theme Twenty Twenty-Three 1.2 on PHP 8.1, no plugins installed

Change History (8)

#1 @sabernhardt
15 months ago

  • Description modified (diff)

#2 @drumbrent
15 months ago

Test Report

Reproduction Report

This report validates that the issue can be reproduced.

Environment

  • WordPress: 6.3
  • PHP: 8.1.9
  • Server: nginx/1.16.0
  • Database: mysqli (Server: 8.0.16 / Client: mysqlnd 8.1.9)
  • Browser: Chrome 116.0.0.0 (macOS)
  • Theme: Twenty Twenty-Three 1.2
  • MU-Plugins: None activated
  • Plugins:
    • WordPress Beta Tester 3.5.3

Actual Results

  • ✅ Error condition occurs (reproduced).

Additional Notes

  • Successfully reproduced in Firefox on macOS (no issues in Chrome).

#3 @iammehedi1
15 months ago

Test Report

This report validates that the indicated issue can be reproduced.

Environment

  • OS: Windows 11 Pro (22H2)
  • Web Server: nginx/1.25.1
  • PHP: 7.4.33
  • WordPress: 6.4-alpha-56267-src
  • Browser: Mozilla Firefox 116.0.3 (64-bit)
  • Theme: Twenty Twenty-Three

Result

  • ✅ I was able to reproduce the exact issue in Mozilla Firefox

Plugins Used

  • Classic Editor -Version 1.6.3

Screenshots to replicate:

Links Added:

https://i.ibb.co/HtQJ8zx/Links-Added.png

Clicking Delete for the first time:

https://i.ibb.co/bHHZdNF/Clicking-Delete-First.png

Clicking Delete second time:

https://i.ibb.co/PWDnfYz/Clicking-Delete-Second.png

#4 @zunaid321
15 months ago

Test Report

This report validates that the indicated issue can be reproduced.

Environment

  • OS: Windows 11 (22H2)
  • Web Server: nginx/1.25.1
  • PHP: 7.4.33
  • WordPress: 6.4-alpha-56267-src
  • Browser: Mozilla Firefox 116.0.3 (64-bit)
  • Theme: Twenty Twenty-Three

Result

  • ✅ Was able to reproduce the issue in Firefox.

Plugins Used

  • Classic Editor v1.6.3
Last edited 15 months ago by zunaid321 (previous) (diff)

#5 @dickmoomaw
15 months ago

Reproduction Report

This report fails to validate that the issue can be reproduced.

Environment

  • OS: macOS 12.6.8
  • WordPress: 6.3
  • PHP: 8.0.30
  • Server: Apache
  • Database: mysqli (Server: 5.7.23-23 / Client: mysqlnd 8.0.30)
  • Browser: Firefox 94.0 (macOS)
  • Theme: Twenty Sixteen 2.9
  • MU-Plugins:
    • SSO 0.4
  • Plugins:
    • Akismet Anti-Spam: Spam Protection 5.2
    • Easy Sidebar Menu Widget 1.0
    • Jetpack 12.5
    • Jetpack Protect 1.4.1
    • MapPress Google Maps and Leaflet Maps 2.88.4
    • PHP Compatibility Checker 1.6.2
    • Variable Column Block 1.2.3
    • Widget Options 3.9.6
    • WordPress Beta Tester 3.5.3
    • WP Header Images 2.1.0

Actual Results

This ticket was mentioned in Slack in #core by zunaid321. View the logs.


15 months ago

#7 @azaozz
3 months ago

  • Keywords needs-patch added

This seems to be a problem in TinyMCE. As far as I see it "merges" the links when pressing the "delete" key. Similar thing can happen with inline image wrapped in a link immediately followed by a text link.

Unfortunately not sure if this can be fixed easily. Attempting to patch TinyMCE 4.9 that is used in WP is not trivial. I don't seem to reproduce it in the new version of TinyMCE, but there are no plans to update to it in core.

#8 @azaozz
2 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Looking here again, seems the only way this can be fixed is by updating TinyMCE as it is a bug in the (old) version of TinyMCE used in core. There seems to be a workaround though: add a space after the first link before deleting.

Closing as wontfix as there are no plans (for now) to update TinyMCE, see #47218.

Note: See TracTickets for help on using tickets.