Customize: Fix ability to shift-click on placeholder/pre-saved nav menu items in preview to focus on corresponding control.

Props westonruter.
Merges [39562] to the 4.7 branch.
Fixes #39102.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39572 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2016-12-12 02:03:22 +00:00
parent 9431b1e310
commit 2ee02541d5
1 changed files with 1 additions and 1 deletions

View File

@ -419,7 +419,7 @@ wp.customize.navMenusPreview = wp.customize.MenusCustomizerPreview = ( function(
return;
}
navMenuItemParts = $( this ).attr( 'class' ).match( /(?:^|\s)menu-item-(\d+)(?:\s|$)/ );
navMenuItemParts = $( this ).attr( 'class' ).match( /(?:^|\s)menu-item-(-?\d+)(?:\s|$)/ );
if ( navMenuItemParts ) {
e.preventDefault();
e.stopPropagation(); // Make sure a sub-nav menu item will get focused instead of parent items.