mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 21:08:44 +01:00
Nav menus: Make the selector for the edit menu item link more specific. Prevents clashing with other elements which have the same class.
fixes #33129. git-svn-id: https://develop.svn.wordpress.org/trunk@33502 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b1933f53dc
commit
55b1dd3411
@ -390,11 +390,11 @@ var wpNavMenu;
|
||||
|
||||
// Refresh the accessibility when the user comes close to the item in any way
|
||||
menu.on( 'mouseenter.refreshAccessibility focus.refreshAccessibility touchstart.refreshAccessibility' , '.menu-item' , function(){
|
||||
api.refreshAdvancedAccessibilityOfItem( $( this ).find( '.item-edit' ) );
|
||||
api.refreshAdvancedAccessibilityOfItem( $( this ).find( 'a.item-edit' ) );
|
||||
} );
|
||||
|
||||
// We have to update on click as well because we might hover first, change the item, and then click.
|
||||
menu.on( 'click', '.item-edit', function() {
|
||||
menu.on( 'click', 'a.item-edit', function() {
|
||||
api.refreshAdvancedAccessibilityOfItem( $( this ) );
|
||||
} );
|
||||
|
||||
@ -511,16 +511,16 @@ var wpNavMenu;
|
||||
$( '.menu-item-settings .field-move a' ).hide();
|
||||
|
||||
// Mark all menu items as unprocessed
|
||||
$( '.item-edit' ).data( 'needs_accessibility_refresh', true );
|
||||
$( 'a.item-edit' ).data( 'needs_accessibility_refresh', true );
|
||||
|
||||
// All open items have to be refreshed or they will show no links
|
||||
$( '.menu-item-edit-active .item-edit' ).each( function() {
|
||||
$( '.menu-item-edit-active a.item-edit' ).each( function() {
|
||||
api.refreshAdvancedAccessibilityOfItem( this );
|
||||
} );
|
||||
},
|
||||
|
||||
refreshKeyboardAccessibility : function() {
|
||||
$( '.item-edit' ).off( 'focus' ).on( 'focus', function(){
|
||||
$( 'a.item-edit' ).off( 'focus' ).on( 'focus', function(){
|
||||
$(this).off( 'keydown' ).on( 'keydown', function(e){
|
||||
|
||||
var arrows,
|
||||
|
Loading…
x
Reference in New Issue
Block a user