Make WordPress Core

Ticket #33129: 33129.3.patch

File 33129.3.patch, 1.6 KB (added by ocean90, 10 years ago)
  • src/wp-admin/js/nav-menu.js

     
    390390
    391391                        // Refresh the accessibility when the user comes close to the item in any way
    392392                        menu.on( 'mouseenter.refreshAccessibility focus.refreshAccessibility touchstart.refreshAccessibility' , '.menu-item' , function(){
    393                                 api.refreshAdvancedAccessibilityOfItem( $( this ).find( '.item-edit' ) );
     393                                api.refreshAdvancedAccessibilityOfItem( $( this ).find( 'a.item-edit' ) );
    394394                        } );
    395395
    396396                        // We have to update on click as well because we might hover first, change the item, and then click.
    397                         menu.on( 'click', '.item-edit', function() {
     397                        menu.on( 'click', 'a.item-edit', function() {
    398398                                api.refreshAdvancedAccessibilityOfItem( $( this ) );
    399399                        } );
    400400
     
    511511                        $( '.menu-item-settings .field-move a' ).hide();
    512512
    513513                        // Mark all menu items as unprocessed
    514                         $( '.item-edit' ).data( 'needs_accessibility_refresh', true );
     514                        $( 'a.item-edit' ).data( 'needs_accessibility_refresh', true );
    515515
    516516                        // All open items have to be refreshed or they will show no links
    517                         $( '.menu-item-edit-active .item-edit' ).each( function() {
     517                        $( '.menu-item-edit-active a.item-edit' ).each( function() {
    518518                                api.refreshAdvancedAccessibilityOfItem( this );
    519519                        } );
    520520                },
    521521
    522522                refreshKeyboardAccessibility : function() {
    523                         $( '.item-edit' ).off( 'focus' ).on( 'focus', function(){
     523                        $( 'a.item-edit' ).off( 'focus' ).on( 'focus', function(){
    524524                                $(this).off( 'keydown' ).on( 'keydown', function(e){
    525525
    526526                                        var arrows,