Make WordPress Core

Changeset 32955


Ignore:
Timestamp:
06/26/2015 05:10:12 PM (11 years ago)
Author:
ocean90
Message:

Customizer: Prevent dragging menu items above the main heading.

Improve targeting for the sortableItems, resolving an issue where the first <li> in the control became a sortable target, allowing the user to drag a single top level menu outside the intended sortable area.

props adamsilverstein.
fixes #32738.
#wceu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/customize-nav-menus.js

    r32891 r32955  
    88    wpNavMenu.originalInit = wpNavMenu.init;
    99    wpNavMenu.options.menuItemDepthPerLevel = 20;
    10     wpNavMenu.options.sortableItems         = '.customize-control-nav_menu_item';
     10    wpNavMenu.options.sortableItems         = '> .customize-control-nav_menu_item';
    1111    wpNavMenu.init = function() {
    1212        this.jQueryExtensions();
Note: See TracChangeset for help on using the changeset viewer.