From 3cf585f1d3c46c343bcb9d1df4f25023d0d5603c Mon Sep 17 00:00:00 2001 From: Matt Thomas Date: Fri, 6 Dec 2013 05:27:19 +0000 Subject: [PATCH] Make toolbar dropdown submenu links tappable. See #25972, props ninnypants. git-svn-id: https://develop.svn.wordpress.org/trunk@26716 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/css/admin-bar.css | 1 - src/wp-includes/js/admin-bar.js | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) 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 ) {