From 8c3f604e4a64fa6b81da30d6d3cba6c9dc0d9d71 Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Tue, 27 Nov 2018 12:17:41 +0300 Subject: [PATCH] web: fixed focus after modal window --- web/js/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/js/ui.js b/web/js/ui.js index 7c14372f..b4c13536 100644 --- a/web/js/ui.js +++ b/web/js/ui.js @@ -299,7 +299,7 @@ function Ui() { el_last_window = (document.activeElement.closest(".modal-window") || document.activeElement.closest(".window")); } - if (el_last_window === el_except) { + if (!el_last_window || el_last_window === el_except) { var max_z_index = 0; __windows.forEach(function(el_window) { var z_index = parseInt(window.getComputedStyle(el_window, null).zIndex) || 0;