[icinga-checkins] icinga.org: icingaweb2/master: JS: Keep search field focus

git at icinga.org git at icinga.org
Tue Feb 2 08:41:00 CET 2016


Module: icingaweb2
Branch: master
Commit: e46832905197dc1058d265bc13bddb7f7ad71d30
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=e46832905197dc1058d265bc13bddb7f7ad71d30

Author: Eric Lippmann <eric.lippmann at netways.de>
Date:   Tue Feb  2 08:40:35 2016 +0100

JS: Keep search field focus

fixes #11029

---

 public/js/icinga/loader.js |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/public/js/icinga/loader.js b/public/js/icinga/loader.js
index 284c1f0..1b7acc1 100644
--- a/public/js/icinga/loader.js
+++ b/public/js/icinga/loader.js
@@ -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)



More information about the icinga-checkins mailing list