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