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.
This commit is contained in:
Eric Lippmann 2016-01-18 12:48:16 +01:00
parent 4251e758a7
commit 7a6d61ceaa
1 changed files with 1 additions and 1 deletions

View File

@ -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') {