Skip to content
Snippets Groups Projects
Commit d4b817ac authored by Benjamin Franzke's avatar Benjamin Franzke
Browse files

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

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

Resolves: #102006
Releases: main, 12.4
Change-Id: I79f23a1c309213fbf12017ecb485c7d963fe5a2f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81172


Tested-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Benj...
parent 902133c0
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment