JS: Fix login autofocus

This commit is contained in:
Eric Lippmann 2016-01-28 12:29:42 +01:00
parent ba9aeada60
commit b5cbf49433
1 changed files with 3 additions and 1 deletions

View File

@ -15,7 +15,9 @@
Autofocus.prototype.onRendered = function(e) { Autofocus.prototype.onRendered = function(e) {
setTimeout(function() { setTimeout(function() {
if (document.activeElement === e.target) { if (document.activeElement === e.target
|| document.activeElement === document.body
) {
$(e.target).find('.autofocus').focus(); $(e.target).find('.autofocus').focus();
} }
}, 0); }, 0);