From 58c38dd77b9c1e3fe55ed62443c72758f31e3131 Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 11 Sep 2017 16:34:00 +0200 Subject: [PATCH] focus on the current window when you pop an alert --- www/common/common-interface.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/www/common/common-interface.js b/www/common/common-interface.js index bd36edb07..b93e57de3 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -237,6 +237,7 @@ define([ setTimeout(function () { $ok.focus(); UI.notify(); + if (!document.hasFocus()) { window.focus(); } }); }; @@ -282,6 +283,7 @@ define([ setTimeout(function () { input.select().focus(); UI.notify(); + if (!document.hasFocus()) { window.focus(); } }); }; @@ -331,6 +333,7 @@ define([ if (typeof(opt.done) === 'function') { opt.done($ok.closest('.dialog')); } + if (!document.hasFocus()) { window.focus(); } }); };