]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/customize-preview-nav-menus.js
WordPress 4.7.1
[autoinstalls/wordpress.git] / wp-includes / js / customize-preview-nav-menus.js
index 27c525107bcf31044f4cf411bba5d6992082b179..6745b41be8465d244128aad5a254e4806751943a 100644 (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.