From 7a6d61ceaad30b0dc2bf84061e8e6a6d4fe71cd2 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 18 Jan 2016 12:48:16 +0100 Subject: [PATCH] JS: Re-focus visible elements only Don't try to re-focus links from dropdown tabs example because they're no longer visible if the page has been loaded. --- public/js/icinga/loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/icinga/loader.js b/public/js/icinga/loader.js index 78f753d1b..733c94d20 100644 --- a/public/js/icinga/loader.js +++ b/public/js/icinga/loader.js @@ -809,7 +809,7 @@ setTimeout(function() { var $activeElement = $(activeElementPath); - if ($activeElement.length) { + if ($activeElement.length && $activeElement.is(':visible')) { $activeElement.focus(); } else if (! autorefresh) { if (typeof $container.attr('tabindex') === 'undefined') {