focus on the current window when you pop an alert

This commit is contained in:
ansuz
2017-09-11 16:34:00 +02:00
parent b9545f45f7
commit 58c38dd77b

View File

@@ -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(); }
});
};