Make WordPress Core

Changeset 59950 for trunk


Ignore:
Timestamp:
03/07/2025 04:20:04 PM (3 months ago)
Author:
joedolson
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.

Props joedolson, abcd95, audrasjb.
Fixes #63059.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/lib/nav-menu.js

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