Review main Merged

81172[BUGFIX] Prevent empty links after updating a link via link-browser

Benjamin Franzke CR +2 V +2 Easy +16 −3 updated 09/25/23, 08:47

Commit message

Remove selection link attributes after updating an existing link
that has been selected with a collapsed selection (that is when
the cursor is placed anywhere inside the link).

We missed to cleanup all our (and ckeditor's) link related
attributes after creating a collapsed selection ("cursor placed after
the link") after a link was updated.

Adapt to upstream logic to cleanup link attributes as seen in
https://github.com/ckeditor/ckeditor5/blob/v39.0.2/packages/ckeditor5-link/src/linkcommand.ts#L206-L208
The logic is slightly modified to use the same generic approach in
https://github.com/ckeditor/ckeditor5/blob/v39.0.2/packages/ckeditor5-link/src/linkediting.ts#L697
included our workaround from #101429

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 2