Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions src/js/_enqueues/wp/customize/nav-menus.js
Original file line number Diff line number Diff line change
Expand Up @@ -1630,9 +1630,9 @@
* Refreshes advanced accessibility buttons for one menu item.
* Shows or hides buttons based on the location of the menu item.
*
* @param {Object} itemToRefresh The menu item that might need its advanced accessibility buttons refreshed
*
* @since 6.6.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can We add @since 6.6.0 before @param {Object} itemToRefresh The menu item that might need its advanced accessibility buttons refreshed. ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

*
* @param {Object} itemToRefresh The menu item that might need its advanced accessibility buttons refreshed
*/
refreshAdvancedAccessibilityOfItem: function( itemToRefresh ) {
// Only refresh accessibility when necessary.
Expand Down Expand Up @@ -1711,7 +1711,7 @@
}
control.renderContent();
control.deferred.embedded.resolve(); // This triggers control.ready().

// Mark all menu items as unprocessed.
$( 'button.item-edit' ).data( 'needs_accessibility_refresh', true );
},
Expand Down Expand Up @@ -1790,7 +1790,7 @@
control.moveRight();
control.params.depth += 1;
}

moveBtn.focus(); // Re-focus after the container was moved.

// Mark all menu items as unprocessed.
Expand Down Expand Up @@ -2421,6 +2421,14 @@
}

parentControl = api.control( 'nav_menu_item[' + settingValue.menu_item_parent + ']' );
if ( ! parentControl ) {
control.setting.set(
$.extend({}, control.setting(), {
menu_item_parent: 0,
})
);
return;
}

// Make this control the parent of all the following siblings.
_( siblingControls ).chain().slice( realPosition ).each(function( siblingControl, i ) {
Expand Down
Loading