Skip to content

Commit

Permalink
🐛 [#4012] Fix content component link popup in form builder
Browse files Browse the repository at this point in the history
because the ckeditor element previously was not removed after closing the modal, this did not work
  • Loading branch information
stevenbal committed May 27, 2024
1 parent 69b95dc commit 97e6d39
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/openforms/js/components/formio_builder/WebformBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,12 @@ class WebformBuilder extends WebformBuilderFormio {
// Clean up.
this.removeEventListener(this.dialog, 'close', dialogClose);
this.dialog = null;

// We have to reset the ckeditor BodyCollection to allow link popups to work
// after closing the editComponent modal
// https://ckeditor.com/docs/ckeditor5/latest/api/module_ui_editorui_bodycollection-BodyCollection.html
// See https://github.com/open-formulieren/open-forms/issues/4012
document.querySelector('.ck-body-wrapper').remove();
};
this.addEventListener(this.dialog, 'close', dialogClose);

Expand Down

0 comments on commit 97e6d39

Please sign in to comment.