Skip to content

Commit 50fb408

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. Reviewed by jorbin. Merges [59950] to the 6.7 branch. Props joedolson, abcd95, audrasjb. Fixes #63059. git-svn-id: https://develop.svn.wordpress.org/branches/6.7@59977 602fd350-edb4-49c9-b593-d223f7449a82
1 parent c835a67 commit 50fb408

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,8 +1221,8 @@
12211221
deletionSpeech = menus.itemsDeleted.replace( '%s', itemsPendingDeletion );
12221222
wp.a11y.speak( deletionSpeech, 'polite' );
12231223
that.disableBulkSelection();
1224-
menus.updateParentDropdown();
1225-
menus.updateOrderDropdown();
1224+
$( '#menu-to-edit' ).updateParentDropdown();
1225+
$( '#menu-to-edit' ).updateOrderDropdown();
12261226
}
12271227
});
12281228
},
@@ -1762,8 +1762,8 @@
17621762
}
17631763
api.refreshAdvancedAccessibility();
17641764
wp.a11y.speak( menus.itemRemoved );
1765-
menus.updateParentDropdown();
1766-
menus.updateOrderDropdown();
1765+
$( '#menu-to-edit' ).updateParentDropdown();
1766+
$( '#menu-to-edit' ).updateOrderDropdown();
17671767
});
17681768
},
17691769

0 commit comments

Comments
 (0)