ckeditor5.dialog.fix.js throws "Uncaught TypeError: event.target.classList is undefined" in Firefox in Drupal 10 with the editor in a modal

Created on 31 March 2023, over 1 year ago
Updated 1 February 2024, 10 months ago

Problem/Motivation

Testing html5 editor in a modal window throws "Uncaught TypeError: event.target.classList is undefined" in line 15 of core/modules/ckeditor5/js/ckeditor5.dialog.fix.js file.

Steps to reproduce

  • Open a modal with a ck5editor5 field inside.
  • switch to another window(i.e: CTRL+TAB) and return to the former window
  • The error is shown on console. (see attached file)

Note: debugging the case found that event.target variable is equal to an "HTMLDocument" object.
For @Anybody this happened in Firefox 112.0.2

Proposed resolution

Probably improving the condition that causes the error (i.e:
return event.target.classList && event.target.classList.contains('ck') || this._super(event);
)

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

๐Ÿ› Bug report
Status

Fixed

Version

10.1 โœจ

Component
CKEditor 5ย  โ†’

Last updated about 13 hours ago

Created by

๐Ÿ‡ฆ๐Ÿ‡ทArgentina gmateos

Live updates comments and jobs are added and updated live.
  • JavaScript

    Affects the content, performance, or handling of Javascript.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024