Review main Merged

91897[BUGFIX] Prevent CKEditor link splitting on partial selection edit

Philipp Kitzberger CR +2 V +2 Easy +38 −2 updated 11/28/25, 09:04

Commit message

When editing an existing link and selecting only part of the link
text (e.g., selecting "word" in "multi word link"), changing the link
target would split the link into multiple separate <a> elements.

This change automatically expands the selection to encompass the
entire link when:
- The user clicks the link button in the toolbar while positioned
  inside or partially selecting a link
- The link browser is opened for an existing link

The expandSelectionToFullLink() method detects if the selection
is within a link and uses findAttributeRange() to expand it to
cover the complete link element before any modifications are made.

This prevents unwanted link fragmentation and ensures a consistent
editing experience.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
    • Andreas Nedbal +1
  • Verified V +2 Done
    • Garvin Hicking +2
    • Andreas Nedbal +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 68

  1. Philipp Kitzberger uploaded patch set 1 11/26/25, 17:07

  2. Philipp Kitzberger updated the commit message in patch set 2 11/26/25, 17:07

  3. core-ci voted on patch set 1 V +1 11/26/25, 17:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91040

  4. core-ci voted on patch set 2 V +1 11/26/25, 17:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91041

  5. Garvin Hicking commented on patch set 2 CR +1 V +1 11/27/25, 08:12

    works for me, can't fully judge the JS part of it though, happy for feedback
  6. Andreas Nedbal voted on patch set 2 CR +1 V +1 11/27/25, 10:39

  7. Garvin Hicking voted on patch set 2 CR +2 V +2 11/28/25, 08:51

  8. Garvin Hicking merged patch set 3 11/28/25, 09:04