Make WordPress Core

Ticket #39102: 39102.0.diff

File 39102.0.diff, 715 bytes (added by westonruter, 7 years ago)
  • src/wp-includes/js/customize-preview-nav-menus.js

    diff --git src/wp-includes/js/customize-preview-nav-menus.js src/wp-includes/js/customize-preview-nav-menus.js
    index 27c5251..6745b41 100644
    wp.customize.navMenusPreview = wp.customize.MenusCustomizerPreview = ( function( 
    419419                                return;
    420420                        }
    421421
    422                         navMenuItemParts = $( this ).attr( 'class' ).match( /(?:^|\s)menu-item-(\d+)(?:\s|$)/ );
     422                        navMenuItemParts = $( this ).attr( 'class' ).match( /(?:^|\s)menu-item-(-?\d+)(?:\s|$)/ );
    423423                        if ( navMenuItemParts ) {
    424424                                e.preventDefault();
    425425                                e.stopPropagation(); // Make sure a sub-nav menu item will get focused instead of parent items.