diff --git a/js/editor.js b/js/editor.js index f595414..4736eca 100644 --- a/js/editor.js +++ b/js/editor.js @@ -1353,5 +1353,16 @@ } }, true); - document.addEventListener('DOMContentLoaded', init); + // Dolibarr injiziert eine globale leere jQuery-UI-Confirm-Box (#confirm-dialog-box + // und #confirm-dialog-box-) — die hat bei uns nie Inhalt weil wir eigene + // Modals nutzen. Kille sie beim Laden und beobachte weitere Einfügungen. + function killDolibarrConfirmBoxes() { + document.querySelectorAll('[id^="confirm-dialog-box"]').forEach(el => { + const wrap = el.closest('.ui-dialog') || el; + wrap.remove(); + }); + } + new MutationObserver(killDolibarrConfirmBoxes) + .observe(document.documentElement, { childList: true, subtree: true }); + document.addEventListener('DOMContentLoaded', () => { killDolibarrConfirmBoxes(); init(); }); })();