Menus: Fix JS Warning when removing menu items.

Move the `updateParentDropdown` and `updateOrderDropdown` methods to be called on the jQuery menu object instead of on the `menus` translations object.

Props joedolson, abcd95, audrasjb.
Fixes .

git-svn-id: https://develop.svn.wordpress.org/trunk@59950 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Joe Dolson 2025-03-07 16:20:04 +00:00
parent 3bff6ee957
commit 4b2c7c00ae

@ -1261,8 +1261,8 @@
deletionSpeech = menus.itemsDeleted.replace( '%s', itemsPendingDeletion );
wp.a11y.speak( deletionSpeech, 'polite' );
that.disableBulkSelection();
menus.updateParentDropdown();
menus.updateOrderDropdown();
$( '#menu-to-edit' ).updateParentDropdown();
$( '#menu-to-edit' ).updateOrderDropdown();
}
});
},
@ -1816,8 +1816,8 @@
}
api.refreshAdvancedAccessibility();
wp.a11y.speak( menus.itemRemoved );
menus.updateParentDropdown();
menus.updateOrderDropdown();
$( '#menu-to-edit' ).updateParentDropdown();
$( '#menu-to-edit' ).updateOrderDropdown();
});
},