Issue #3351600 by andrew.farquharson, Ranjit1032002, Anybody, sanduhrs, gmateos, smustgrave, Wim Leers, ant1, catch: ckeditor5.dialog.fix.js throws "Uncaught TypeError: event.target.classList is undefined" in Firefox in Drupal 10 with the editor in a modal

merge-requests/4988/head
Lauri Eskola 2023-10-11 08:46:33 +03:00
parent e99bc70d19
commit 8b0a91f602
No known key found for this signature in database
GPG Key ID: 382FC0F5B0DF53F8
1 changed files with 6 additions and 0 deletions

View File

@ -12,6 +12,12 @@
// CKEditor 5 in modals can work as expected. // CKEditor 5 in modals can work as expected.
// @see https://api.jqueryui.com/dialog/#method-_allowInteraction // @see https://api.jqueryui.com/dialog/#method-_allowInteraction
_allowInteraction(event) { _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); return event.target.classList.contains('ck') || this._super(event);
}, },
}); });