From f9bf9af0cb2ff1b45b285f7681f9023190da3f54 Mon Sep 17 00:00:00 2001 From: Salvialf Date: Sat, 4 Jul 2026 17:37:12 +0200 Subject: [PATCH] fix(jeeDialog): scope clearToasts to the dialog being closed --- core/dom/dom.ui.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/core/dom/dom.ui.js b/core/dom/dom.ui.js index 78eaf0b28a..dc306b3b31 100644 --- a/core/dom/dom.ui.js +++ b/core/dom/dom.ui.js @@ -811,8 +811,12 @@ var jeeDialog = (function() { }) return toast } - exports.clearToasts = function() { - document.querySelectorAll('.jeeToastContainer')?.remove() + exports.clearToasts = function(_scope) { + document.querySelectorAll('.jeeToastContainer').forEach(function(_container) { + if (!_scope || _scope.contains(_container)) { + _container.remove() + } + }) return true } @@ -1604,7 +1608,7 @@ var jeeDialog = (function() { close: function() { this.dialog._jeeDialog.options.beforeClose() this.dialog.querySelector('div.jeeDialogContent').empty() - jeeDialog.clearToasts() + jeeDialog.clearToasts(this.dialog) this.dialog.unseen() this.dialog._jeeDialog.options.onClose() this.dialog.removeClass('active') @@ -1804,7 +1808,7 @@ var jeeCtxMenu = function(_options) { display: null }) _ctxMenu.seen() - + //Is there use positionning: if (ctxInstance.options.position) { ctxInstance.options.position.apply(ctxInstance, [ctxInstance, _event.clientX, _event.clientY])