diff --git a/public/js/icinga/behavior/autofocus.js b/public/js/icinga/behavior/autofocus.js index 35614a46e..d6afeb66a 100644 --- a/public/js/icinga/behavior/autofocus.js +++ b/public/js/icinga/behavior/autofocus.js @@ -15,7 +15,9 @@ Autofocus.prototype.onRendered = function(e) { setTimeout(function() { - if (document.activeElement === e.target) { + if (document.activeElement === e.target + || document.activeElement === document.body + ) { $(e.target).find('.autofocus').focus(); } }, 0);