mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 22:45:39 +00: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. Built from https://develop.svn.wordpress.org/trunk@33502 git-svn-id: http://core.svn.wordpress.org/trunk@33469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c9871174d1
commit
a5aa0dc9fd
@ -390,11 +390,11 @@ var wpNavMenu;
|
|||||||
|
|
||||||
// Refresh the accessibility when the user comes close to the item in any way
|
// 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(){
|
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.
|
// 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 ) );
|
api.refreshAdvancedAccessibilityOfItem( $( this ) );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
@ -511,16 +511,16 @@ var wpNavMenu;
|
|||||||
$( '.menu-item-settings .field-move a' ).hide();
|
$( '.menu-item-settings .field-move a' ).hide();
|
||||||
|
|
||||||
// Mark all menu items as unprocessed
|
// 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
|
// 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 );
|
api.refreshAdvancedAccessibilityOfItem( this );
|
||||||
} );
|
} );
|
||||||
},
|
},
|
||||||
|
|
||||||
refreshKeyboardAccessibility : function() {
|
refreshKeyboardAccessibility : function() {
|
||||||
$( '.item-edit' ).off( 'focus' ).on( 'focus', function(){
|
$( 'a.item-edit' ).off( 'focus' ).on( 'focus', function(){
|
||||||
$(this).off( 'keydown' ).on( 'keydown', function(e){
|
$(this).off( 'keydown' ).on( 'keydown', function(e){
|
||||||
|
|
||||||
var arrows,
|
var arrows,
|
||||||
|
2
wp-admin/js/nav-menu.min.js
vendored
2
wp-admin/js/nav-menu.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.3-beta4-33501';
|
$wp_version = '4.3-beta4-33502';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user