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

// Prevent focused element from being hidden by the sticky footer.
$( '.menu-edit a, .menu-edit button, .menu-edit input, .menu-edit textarea, .menu-edit select' ).on('focus', function() {
// The sticky footer's own controls are always in view, so scrolling
// to reveal them would shift the footer out from under the pointer
// mid-click and drop the Save or Delete activation. See #65684.
if ( $( this ).closest( '#nav-menu-footer' ).length ) {
return;
}
if ( window.innerWidth >= 783 ) {
var navMenuHeight = $( '#nav-menu-footer' ).height() + 20;
var bottomOffset = $(this).offset().top - ( $(window).scrollTop() + $(window).height() - $(this).height() );
Expand Down
Loading