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])