JS: Keep search field focus

fixes #11029
This commit is contained in:
Eric Lippmann 2016-02-02 08:40:35 +01:00
parent 34344915f2
commit e468329051
1 changed files with 3 additions and 0 deletions

View File

@ -734,8 +734,11 @@
var activeElementPath = false;
var focusFallback = false;
if (forceFocus && forceFocus.length) {
activeElementPath = this.icinga.utils.getCSSPath($(forceFocus));
} else if (document.activeElement.id === 'search') {
activeElementPath = '#search';
} else if (document.activeElement
&& document.activeElement !== document.body
&& $.contains($container[0], document.activeElement)