diff --git a/src/openforms/js/components/formio_builder/WebformBuilder.js b/src/openforms/js/components/formio_builder/WebformBuilder.js index a8c18f8b29..12e0a66579 100644 --- a/src/openforms/js/components/formio_builder/WebformBuilder.js +++ b/src/openforms/js/components/formio_builder/WebformBuilder.js @@ -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);