Focus active navigation item on popup. Fix #1049.

This commit is contained in:
FelisCatus 2017-04-13 16:22:49 -04:00
parent 118c3588d3
commit 3854a019d2
2 changed files with 7 additions and 1 deletions

View File

@ -48,6 +48,11 @@
handler();
}
});
$script.ready('om-profile-items', function() {
var activeNavLink = document.querySelector('.om-nav-item.om-active > a');
if (activeNavLink) activeNavLink.focus();
});
}
function tabbableElementsOnly(node) {

View File

@ -5,7 +5,7 @@
var profileTemplate = document.getElementById('js-profile-tpl')
.cloneNode(true);
profileTemplate.classList.remove('om-profile-tpl');
profileTemplate.removeAttribute('id');
var iconForProfileType = {
'DirectProfile': 'glyphicon-transfer',
@ -34,6 +34,7 @@
return;
}
addProfilesItems(state);
$script.done('om-profile-items');
updateOtherItems(state);
}