Closed (fixed)
Project:
Linkit
Version:
6.1.x-dev
Component:
User interface
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Jun 2023 at 19:48 UTC
Updated:
23 May 2024 at 02:54 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
mark_fullmerThanks for the GIF illustrating the problem. I've encountered this problem, too. I assume it has to do with CKEditor 5's upcasted version of the element having a greedy boundary.
Setting the priority to "Major," as this could cause headaches for content editors.
Comment #3
mark_fullmerUpdate: this is still considered a "Major" level bug for Linkit, and is still prioritized.
Comment #6
trackleft2Comment #7
trackleft2The issue is present, even with the patch applied.
Comment #8
trackleft2FYI https://ckeditor.com/docs/ckeditor5/latest/features/link.html#typing-aro...
Comment #9
trackleft2Comment #10
trackleft2Comment #12
acbramley commented#10 fixes it but it completely breaks linkit functionality, data attributes are missing entirely.
Comment #15
edwardsay commentedThis issue was partially resolved in Drupal Core 10.2 because it uses CKEditor version 40.
After the update, there is no "This link has no URL" tooltip when clicking on the end of the link. But it is still present when clicking on the start of the link.
Comment #16
trackleft2Updated the MR and added a new patch against 6.1.x
Comment #18
drpldrp commentedCkEditor does special link handling if the element attribute data model name starts with "link", eg. "linkHref" or "linkWhatever".
LinkIt uses
['data-entity-type', 'data-entity-uuid', 'data-entity-substitution']for both the attribute model and view names.So because the model names don't start with "link", CkEditor thinks it should inherit the previous element attributes like for bold or other styling.
The fix is to split out the attribute vars so the model names start with "link" and the view names stay the same.
Attached patch tested with Drupal 10.1.8 and LinkIt 6.1.3.
Comment #19
drpldrp commentedMarking as Needs Review. Sorry if this is not the appropriate workflow, ie. this is missing tests, requires MR, or anything else.
Comment #24
mark_fullmerThe explanation for the root cause, provided in #18, makes sense to me, above, and the code change looks valid. Tests pass, so let's merge this!
Comment #25
acbramley commentedAmazing, thanks everyone! And thanks a lot @mark_fullmer for including this in a release already :)