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. git-svn-id: https://develop.svn.wordpress.org/trunk@38807 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
246aa65a19
commit
456c23c551
@ -397,7 +397,7 @@
|
||||
}
|
||||
self.pages[ type + ':' + object ] = -1;
|
||||
return;
|
||||
} else if ( 'page' === object ) {
|
||||
} else if ( ( 'page' === object ) && ( ! availableMenuItemContainer.hasClass( 'open' ) ) ) {
|
||||
availableMenuItemContainer.find( '.accordion-section-title > button' ).click();
|
||||
}
|
||||
items = new api.Menus.AvailableItemCollection( items ); // @todo Why is this collection created and then thrown away?
|
||||
|
Loading…
Reference in New Issue
Block a user