js/loader: do not steal focus placed by module

This commit is contained in:
Thomas Gelf 2016-11-16 10:49:28 +00:00
parent e75bfbc197
commit ce6fa235cb
1 changed files with 4 additions and 1 deletions

View File

@ -827,7 +827,10 @@
if (typeof $container.attr('tabindex') === 'undefined') {
$container.attr('tabindex', -1);
}
$container.focus();
// Do not touch focus in case a module or component already placed it
if ($(document.activeElement).closest('.container').attr('id') !== containerId) {
$container.focus();
}
}, 0);
}
} else {