asdasd
This commit is contained in:
@@ -165,6 +165,7 @@
|
|||||||
const closeModal = () => {
|
const closeModal = () => {
|
||||||
editor.__bridgeRteAllowClose = true;
|
editor.__bridgeRteAllowClose = true;
|
||||||
editor.__bridgeRteModalOpen = false;
|
editor.__bridgeRteModalOpen = false;
|
||||||
|
if (B.allowModalCloseOnce) B.allowModalCloseOnce();
|
||||||
if (typeof modal.__bridgeOriginalClose === 'function') {
|
if (typeof modal.__bridgeOriginalClose === 'function') {
|
||||||
modal.__bridgeOriginalClose();
|
modal.__bridgeOriginalClose();
|
||||||
} else if (typeof modal.close === 'function') {
|
} else if (typeof modal.close === 'function') {
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
const installModalGuards = () => {
|
const installModalGuards = () => {
|
||||||
if (window.__bridgeModalGuardsInstalled) return;
|
if (window.__bridgeModalGuardsInstalled) return;
|
||||||
window.__bridgeModalGuardsInstalled = true;
|
window.__bridgeModalGuardsInstalled = true;
|
||||||
|
window.__bridgeModalAllowClose = false;
|
||||||
|
|
||||||
document.addEventListener('click', (evt) => {
|
document.addEventListener('click', (evt) => {
|
||||||
const container = evt.target && evt.target.closest
|
const container = evt.target && evt.target.closest
|
||||||
@@ -40,6 +41,12 @@
|
|||||||
if (!content) {
|
if (!content) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const closeBtn = evt.target.closest && evt.target.closest('.gjs-mdl-btn-close,[data-bridge-modal-close="1"]');
|
||||||
|
if (closeBtn) {
|
||||||
|
window.__bridgeModalAllowClose = true;
|
||||||
|
setTimeout(() => { window.__bridgeModalAllowClose = false; }, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, true);
|
}, true);
|
||||||
@@ -570,7 +577,24 @@
|
|||||||
|
|
||||||
// Keep the fix off live updates to avoid cursor jumps; run only on RTE close.
|
// Keep the fix off live updates to avoid cursor jumps; run only on RTE close.
|
||||||
|
|
||||||
window.__gjs = ed;
|
window.__gjs = ed;
|
||||||
|
|
||||||
|
if (ed && ed.Modal && !ed.Modal.__bridgeCloseGuarded) {
|
||||||
|
ed.Modal.__bridgeCloseGuarded = true;
|
||||||
|
ed.Modal.__bridgeOriginalClose = ed.Modal.close ? ed.Modal.close.bind(ed.Modal) : null;
|
||||||
|
if (ed.Modal.close) {
|
||||||
|
ed.Modal.close = function (...args) {
|
||||||
|
if (window.__bridgeModalAllowClose && ed.Modal.__bridgeOriginalClose) {
|
||||||
|
return ed.Modal.__bridgeOriginalClose(...args);
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
B.allowModalCloseOnce = () => {
|
||||||
|
window.__bridgeModalAllowClose = true;
|
||||||
|
setTimeout(() => { window.__bridgeModalAllowClose = false; }, 0);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// 🛑 KRITISCHE KORREKTUR 1: Explizite Erstellung aller konfigurierten Kategorien
|
// 🛑 KRITISCHE KORREKTUR 1: Explizite Erstellung aller konfigurierten Kategorien
|
||||||
ensureConfiguredCategories(ed);
|
ensureConfiguredCategories(ed);
|
||||||
|
|||||||
Reference in New Issue
Block a user