From 2ecd6b074535817f032b99a9c2bc022d2cebec08 Mon Sep 17 00:00:00 2001 From: the-djmaze <3752035+the-djmaze@users.noreply.github.com> Date: Mon, 2 Nov 2026 17:49:39 +0100 Subject: [PATCH] Reopening a popup during its fade out kept the previous contents https://github.com/the-djmaze/snappymail/commit/72ee2b0863cc92c4596f4c92f60b6a8ce8590b22 --- dev/Knoin/Knoin.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dev/Knoin/Knoin.js b/dev/Knoin/Knoin.js index 12d07d1cb..dc8bfd104 100644 --- a/dev/Knoin/Knoin.js +++ b/dev/Knoin/Knoin.js @@ -94,7 +94,13 @@ const i18nToNodes(vmDom); visiblePopups.add(vm); vmDom.style.zIndex = 3001 + (visiblePopups.size * 2); - vmDom.showModal(); + // The dialog is only closed on transitionend, so reopening + // during the fade out finds it still open, and showModal on + // an open dialog throws. That threw out of this subscriber + // and out of modalVisible(true), so showScreenPopup never + // reached vm.onShow and the popup kept the previous item's + // values until it was closed and opened again. + vmDom.open || vmDom.showModal(); if (vmDom.backdrop) { vmDom.backdrop.style.zIndex = 3000 + (visiblePopups.size * 2); }