Clicking outside of Link dialog appears to save attributes but does not update source code

Created on 5 August 2025, 26 days ago

Problem/Motivation

I'm finding some other behaviour issues with the new CKEditor45+ interface. I'm not sure if this should be part of https://www.drupal.org/project/editor_advanced_link/issues/3534699 📌 Refactor custom JS for CKEditor5 v45+ Active

Using some attributes such as "title" or "aria-label" work unintuitively with the "Update" button in the Link dialog.

If the "Update" button is not used, it seems like the attribute is saved but it does not actually update the source code. The link dialog closes when a user clicks outside of it. If you return to the link dialog, the attribute is still there, but actually the source code has not been updated.

The "Open in a new window" attribute works differently and could cause confusion about how things are meant to work. After creating a link and using the Link Properties dialog, clicking on the "Open in a new window" tab will update the source code right away. There is no "Update" button and so clicking outside of the dialog is enough to make the change "stick."

Steps to reproduce

This video shows the behaviour as well -- https://www.loom.com/share/5ea53a5bb97941b6a2b3cfb0edd5e9b7?sid=ad58c33a...

    <
  • start from a blank page, type one word and then add a link to it, clicking on "Insert" when finished
  • click on the link, click on the Link button, type some text in the "Title" field, click away from the dialog without clicking the "Update" button
  • check the source and confirm that the "title" attribute is not present
  • click on the link again and the Link button, see that the title text is still in the "Title" field
  • click "Update" and check the source and see the "title" attribute is present
  • click on the link and the Link button, erase completely the text from the "Title" field, click away from the dialog without clicking the "Update" button
  • check the source and confirm that the "title" attribute is still there and not erased
  • click on the link and the Link button and see that the "Title" field is empty
  • click "Update" and check the source and see now the "Title" attibute is gone

Proposed resolution

The fact that the two dialogs function differently is not intuitive. Perhaps the information in fields like the Title or ARIA Label fields should not persist in the dialog if the dialog is closed without using the "Update" button.

🐛 Bug report
Status

Active

Version

2.3

Component

User interface

Created by

🇨🇦Canada endless_wander

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024