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
12 changes: 12 additions & 0 deletions src/js/_enqueues/lib/nav-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,18 @@
}
});

/*
* Touch Punch treats any touchmove on the sortable handle as a drag and
* suppresses the click, so a tap on the edit link that moves even one
* pixel never opens the menu item. Keep touches on the link from reaching
* the sortable, and let the browser fire the click.
*/
api.menuList[0].addEventListener( 'touchstart', function( event ) {
if ( event.target.closest && event.target.closest( '.item-edit' ) ) {
event.stopPropagation();
}
}, true );

/**
* Updates the shared variables used to determine the depth of the menu item being moved.
*
Expand Down
Loading