adas
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user