CKEditor unloads on every AJAX submit due to missing trigger info

Created on 20 March 2016, over 8 years ago
Updated 23 October 2023, about 1 year ago

The CKEditor instance always unloads if an AJAX request is sent from the page it is part of. This happens for example if having a Drupal Core Image field widget on the same node creation form and clicking "Upload" there (even without an image selected) or "Remove" after having one uploaded.

The correct behavior is that CKEditor would unload only if the DOM element hosting the CKEditor is unloaded (see Drupal.detachBehaviors). It always unloads because the trigger parameter of Drupal.detachBehaviors is not transmitted all the way to Drupal.editors.ckeditor.detach() in editor/modules/editor_ckeditor/js/ckeditor.js:23, so the detach() function will always react as if trigger == "unload" and destroy the CKEditor instance.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇩🇪Germany tanius

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024