This commit is contained in:
2026-01-25 23:45:04 +01:00
parent 68857b2387
commit f229834b49

View File

@@ -279,12 +279,16 @@
this.modalOpen = true;
this.allowClose = false;
let rteInstance = null;
let rteTargetEl = null;
try {
const editing = editor.getEditing && editor.getEditing();
if (editing && editing.model === component && editor.setEditing) {
editor.setEditing(null);
}
if (editor.RichTextEditor && editor.RichTextEditor.disable && component.view && component.view.el) {
rteInstance = editor.RichTextEditor;
rteTargetEl = component.view.el;
editor.RichTextEditor.disable(component.view.el);
}
} catch {}
@@ -292,6 +296,9 @@
const closeModal = () => {
this.allowClose = true;
this.modalOpen = false;
if (rteInstance && typeof rteInstance.enable === 'function' && rteTargetEl) {
try { rteInstance.enable(rteTargetEl); } catch {}
}
if (this.B.allowModalCloseOnce) this.B.allowModalCloseOnce();
if (typeof modal.close === 'function') {
modal.close();