Make WordPress Core

Ticket #18556: 18556.6.diff

File 18556.6.diff, 1.3 KB (added by sabernhardt, 3 years ago)
  • src/js/_enqueues/admin/common.js

     
    843843                $(e.target).parent().siblings('a').get(0).click();
    844844        });
    845845
     846        // Disables popup menus on the admin toolbar and admin menu while dragging.
     847        var draggables = '.widget, .widgets-sortables, .meta-box-sortables, .menu';
     848        var popups     = '#wpadminbar .menupop .ab-submenu, #adminmenu .wp-not-current-submenu .wp-submenu, .folded #adminmenu .wp-has-current-submenu .wp-submenu';
     849        $( draggables ).on( 'sortstart dragstart sortstop dragstop', function() {
     850                $( popups ).toggleClass( 'hidden' );
     851        });
     852
    846853        /**
    847854         * Collapses the admin menu.
    848855         *
  • src/wp-includes/css/admin-bar.css

     
    343343        box-shadow: none;
    344344}
    345345
     346#wpadminbar .quicklinks .menupop ul.ab-sub-secondary.hidden {
     347        display: none;
     348}
     349
    346350#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,
    347351#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu {
    348352        background: #3c434a;