Skip to content
Snippets Groups Projects

Issue #3351600: ckeditor5.dialog.fix.js throw "Uncaught TypeError: event.target.classList is undefined" in Drupal 10 with the editor in a modal

Open Issue #3351600: ckeditor5.dialog.fix.js throw "Uncaught TypeError: event.target.classList is undefined" in Drupal 10 with the editor in a modal
@@ -12,6 +12,12 @@
// CKEditor 5 in modals can work as expected.
// @see https://api.jqueryui.com/dialog/#method-_allowInteraction
_allowInteraction(event) {
// Fixes "Uncaught TypeError: event.target.classList is undefined"
// in Firefox (only).
// @see https://www.drupal.org/project/drupal/issues/3351600
if (event.target.classList === undefined) {
return this._super(event);
}
return event.target.classList.contains('ck') || this._super(event);
},
});
Loading