Make WordPress Core

Ticket #25972: 25972.3.diff

File 25972.3.diff, 709 bytes (added by ninnypants, 12 years ago)

Instead of trying to remove the prevent default just stop propagation on any items that aren't in the root of the menu.

  • wp-includes/js/admin-bar.js

    diff --git wp-includes/js/admin-bar.js wp-includes/js/admin-bar.js
    index ce44436..1b576b7 100644
    if ( typeof(jQuery) != 'undefined' ) { 
    2020                        adminbar.find('li.menupop').on('click.wp-mobile-hover', function(e) {
    2121                                var el = $(this);
    2222
    23                                 if ( !el.hasClass('hover') ) {
     23                                if ( el.parent().is('#wp-admin-bar-root-default') && !el.hasClass('hover') ) {
    2424                                        e.preventDefault();
    2525                                        adminbar.find('li.menupop.hover').removeClass('hover');
    2626                                        el.addClass('hover');
     27                                } else if ( !el.hasClass('hover') ) {
     28                                        e.stopPropagation();
     29                                        e.preventDefault();
     30                                        el.addClass('hover');
    2731                                }
    2832
    2933                                if ( unbind ) {