summaryrefslogtreecommitdiffstats
path: root/wp-admin/js/customize-nav-menus.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:57:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:57:30 +0000
commitfa9a33d818470a5796f0ff8797f98b510ed8de18 (patch)
treebde6a1eede376f9b5df5898ce812330152984d8e /wp-admin/js/customize-nav-menus.js
parentReleasing progress-linux version 6.4.3+dfsg1-1~progress7.99u1. (diff)
downloadwordpress-fa9a33d818470a5796f0ff8797f98b510ed8de18.tar.xz
wordpress-fa9a33d818470a5796f0ff8797f98b510ed8de18.zip
Merging upstream version 6.5+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--wp-admin/js/customize-nav-menus.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/wp-admin/js/customize-nav-menus.js b/wp-admin/js/customize-nav-menus.js
index 8930f15..9dad3e1 100644
--- a/wp-admin/js/customize-nav-menus.js
+++ b/wp-admin/js/customize-nav-menus.js
@@ -1664,6 +1664,8 @@
$reorderNav = control.container.find( '.menu-item-reorder-nav' );
$reorderNav.find( '.menus-move-up, .menus-move-down, .menus-move-left, .menus-move-right' ).on( 'click', function() {
var moveBtn = $( this );
+ control.params.depth = control.getDepth();
+
moveBtn.focus();
var isMoveUp = moveBtn.is( '.menus-move-up' ),
@@ -1677,8 +1679,19 @@
control.moveDown();
} else if ( isMoveLeft ) {
control.moveLeft();
+ if ( 1 === control.params.depth ) {
+ control.container.find( '.is-submenu' ).hide();
+ } else {
+ control.container.find( '.is-submenu' ).show();
+ }
} else if ( isMoveRight ) {
control.moveRight();
+ control.params.depth += 1;
+ if ( 0 === control.params.depth ) {
+ control.container.find( '.is-submenu' ).hide();
+ } else {
+ control.container.find( '.is-submenu' ).show();
+ }
}
moveBtn.focus(); // Re-focus after the container was moved.