Testing with Drupal 11.2.8, linkit 7.0.11, editor_advanced_link 2.3.3 and ckeditor5_plugin_pack 1.4.1
If I toggle the 'Open in new window' option more than once (i.e. on, then off again) it results in a second hyperlink being inserted.
Looks related to #3534699
A console error is also logged.
Uncaught CKEditorError: attribute-operation-range-not-flat
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-attribute-operation-range-not-flat
at zs._validate (ckeditor5-dll.js?v=45.2.2:5:391176)
at on.priority (ckeditor5-dll.js?v=45.2.2:5:470168)
at qi.fire (ckeditor5-dll.js?v=45.2.2:5:638431)
at <computed> [as applyOperation] (ckeditor5-dll.js?v=45.2.2:5:641978)
at d (ckeditor5-dll.js?v=45.2.2:5:455429)
at Ai (ckeditor5-dll.js?v=45.2.2:5:455476)
at xi.setAttribute (ckeditor5-dll.js?v=45.2.2:5:447194)
at linkit.js?t5wbip:1:2404
at Array.forEach (<anonymous>)
at n (linkit.js?t5wbip:1:2382)
Issue fork editor_advanced_link-3558391
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
jannakha commentedin progress
Comment #4
jannakha commented- the exception is thrown from Linkit js - it was fixed with #3559805
- added try/catch to editor_advanced_link to prevent same issue as Linkit (in case there's other module that might affect selection)
Comment #5
jannakha commentedTODO: implement same fix as in https://www.drupal.org/project/linkit/issues/3559805
Comment #6
jannakha commentedComment #7
jannakha commentedalready implemented https://www.drupal.org/project/linkit/issues/3559805