WordPress.org

Make WordPress Core

Changeset 38807


Ignore:
Timestamp:
10/17/16 16:22:14 (11 months ago)
Author:
westonruter
Message:

Customize: Skip triggering initial click on pages section for available nav menu items if already open.

Fixes race condition if user opens Pages section before the ajax request to load items finishes.

Props ryankienstra, celloexpressions.
Fixes #36984.

File:
1 edited

Legend:

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

    r38767 r38807  
    398398                    self.pages[ type + ':' + object ] = -1; 
    399399                    return; 
    400                 } else if ( 'page' === object ) { 
     400                } else if ( ( 'page' === object ) && ( ! availableMenuItemContainer.hasClass( 'open' ) ) ) { 
    401401                    availableMenuItemContainer.find( '.accordion-section-title > button' ).click(); 
    402402                } 
Note: See TracChangeset for help on using the changeset viewer.