Skip to content

Commit 4b2c7c0

Browse files
committed
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 #63059. git-svn-id: https://develop.svn.wordpress.org/trunk@59950 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 3bff6ee commit 4b2c7c0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/js/_enqueues/lib/nav-menu.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,8 +1261,8 @@
12611261
deletionSpeech = menus.itemsDeleted.replace( '%s', itemsPendingDeletion );
12621262
wp.a11y.speak( deletionSpeech, 'polite' );
12631263
that.disableBulkSelection();
1264-
menus.updateParentDropdown();
1265-
menus.updateOrderDropdown();
1264+
$( '#menu-to-edit' ).updateParentDropdown();
1265+
$( '#menu-to-edit' ).updateOrderDropdown();
12661266
}
12671267
});
12681268
},
@@ -1816,8 +1816,8 @@
18161816
}
18171817
api.refreshAdvancedAccessibility();
18181818
wp.a11y.speak( menus.itemRemoved );
1819-
menus.updateParentDropdown();
1820-
menus.updateOrderDropdown();
1819+
$( '#menu-to-edit' ).updateParentDropdown();
1820+
$( '#menu-to-edit' ).updateOrderDropdown();
18211821
});
18221822
},
18231823

0 commit comments

Comments
 (0)