Allow access to any admin bar menu level by tabbing. fixes #19088.

git-svn-id: http://svn.automattic.com/wordpress/trunk@19427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
koopersmith
2011-11-23 21:29:33 +00:00
parent b2a114b952
commit da541dccac
3 changed files with 10 additions and 6 deletions

View File

@@ -23,7 +23,7 @@ if ( typeof(jQuery) != 'undefined' ) {
}).focus().select();
});
$('.ab-top-menu > li > .ab-item').bind('focus.adminbar', function(){
$('#wpadminbar ul > li > .ab-item').bind('focus.adminbar', function(){
$(this).parent().addClass('hover').find('.ab-item').each(function(i, el){
var node = $(el), tab = node.attr('tabindex');
if ( tab )
@@ -42,9 +42,13 @@ if ( typeof(jQuery) != 'undefined' ) {
var top = $(this).parents('li.menupop');
setTimeout(function(){
if ( !top.find('.ab-item:focus').length )
top.removeClass('hover');
}, 150);
top.each( function() {
var t = $(this);
if ( ! t.find('.ab-item:focus').length )
t.removeClass('hover');
});
}, 100);
});
});