From 2e1961bdf7268de4f762c679216439e57ece26cf Mon Sep 17 00:00:00 2001 From: tophf Date: Fri, 3 Jun 2022 18:41:25 +0300 Subject: [PATCH] messageBox.element is nulled in close() --- js/dlg/message-box.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/dlg/message-box.js b/js/dlg/message-box.js index 8fe51611..247dad25 100644 --- a/js/dlg/message-box.js +++ b/js/dlg/message-box.js @@ -150,10 +150,10 @@ messageBox.show = async ({ function resolveWith(value) { setTimeout(messageBox._resolve, 0, value); - messageBox.close(true); if (messageBox.element.contains(document.activeElement)) { messageBox._originalFocus.focus(); } + messageBox.close(true); } function createElement() {