JS: Fix login autofocus
This commit is contained in:
parent
ba9aeada60
commit
b5cbf49433
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue