Make WordPress Core

Changeset 59977


Ignore:
Timestamp:
03/12/2025 08:14:21 PM (7 weeks ago)
Author:
jorbin
Message:

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.

Location:
branches/6.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.7

  • branches/6.7/src/js/_enqueues/lib/nav-menu.js

    r59432 r59977  
    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            });
     
    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        },
Note: See TracChangeset for help on using the changeset viewer.