Customize: Fix behavior of clicking Delete Menu link and keep available nav menu items panel open when doing bulk deletion.
Props maguiar, adamsilverstein for testing. Amends [39548]. Fixes #38953. Built from https://develop.svn.wordpress.org/trunk@40396 git-svn-id: http://core.svn.wordpress.org/trunk@40303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ad293eade7
commit
57b386ef1e
|
@ -1331,8 +1331,14 @@
|
||||||
this.container.find( '.menu-item-handle' ).on( 'click', function( e ) {
|
this.container.find( '.menu-item-handle' ).on( 'click', function( e ) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
var menuControl = control.getMenuControl(),
|
||||||
|
isDeleteBtn = $( e.target ).is( '.item-delete, .item-delete *' ),
|
||||||
|
isAddNewBtn = $( e.target ).is( '.add-new-menu-item, .add-new-menu-item *' );
|
||||||
|
|
||||||
|
if ( $( 'body' ).hasClass( 'adding-menu-items' ) && ! isDeleteBtn && ! isAddNewBtn ) {
|
||||||
api.Menus.availableMenuItemsPanel.close();
|
api.Menus.availableMenuItemsPanel.close();
|
||||||
var menuControl = control.getMenuControl();
|
}
|
||||||
|
|
||||||
if ( menuControl.isReordering || menuControl.isSorting ) {
|
if ( menuControl.isReordering || menuControl.isSorting ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2223,7 +2229,7 @@
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
control.container.find( '.menu-delete' ).on( 'click', function( event ) {
|
control.container.find( '.menu-delete-item' ).on( 'click', function( event ) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
control.setting.set( false );
|
control.setting.set( false );
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.8-alpha-40395';
|
$wp_version = '4.8-alpha-40396';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue