diff --git a/src/wp-includes/css/admin-bar.css b/src/wp-includes/css/admin-bar.css index 618e4c35f9..0a9bd38ff3 100644 --- a/src/wp-includes/css/admin-bar.css +++ b/src/wp-includes/css/admin-bar.css @@ -1000,7 +1000,6 @@ } #wpadminbar .ab-top-menu > .menupop li > .ab-sub-wrapper { - display: inline-block; margin: 0; width: 100%; top: auto; diff --git a/src/wp-includes/js/admin-bar.js b/src/wp-includes/js/admin-bar.js index ce44436868..1b576b70d5 100644 --- a/src/wp-includes/js/admin-bar.js +++ b/src/wp-includes/js/admin-bar.js @@ -20,10 +20,14 @@ if ( typeof(jQuery) != 'undefined' ) { adminbar.find('li.menupop').on('click.wp-mobile-hover', function(e) { var el = $(this); - if ( !el.hasClass('hover') ) { + if ( el.parent().is('#wp-admin-bar-root-default') && !el.hasClass('hover') ) { e.preventDefault(); adminbar.find('li.menupop.hover').removeClass('hover'); el.addClass('hover'); + } else if ( !el.hasClass('hover') ) { + e.stopPropagation(); + e.preventDefault(); + el.addClass('hover'); } if ( unbind ) {