Ticket #45903: 45903.patch
File 45903.patch, 2.0 KB (added by , 6 years ago) |
---|
-
src/wp-content/themes/twentynineteen/js/priority-menu.js
116 116 } 117 117 118 118 // Adds the necessary UI to operate the menu. 119 var visibleList = container.parentNode.querySelector('.main-menu[id]'); 120 var hiddenList = visibleList.parentNode.nextElementSibling.querySelector('.hidden-links'); 121 var toggleButton = visibleList.parentNode.nextElementSibling.querySelector('.main-menu-more-toggle'); 119 var visibleList = container.parentNode.querySelector('.main-menu[id]'); 120 var nextElementSibling = visibleList.parentNode.nextElementSibling; 122 121 122 if ( ! nextElementSibling ) { 123 return; 124 } 125 126 var hiddenList = nextElementSibling.querySelector('.hidden-links'); 127 var toggleButton = nextElementSibling.querySelector('.main-menu-more-toggle'); 128 123 129 if ( isOverflowingNavivation( visibleList, toggleButton, container ) ) { 124 130 125 131 // Record the width of the list -
src/wp-content/themes/twentynineteen/js/touch-keyboard-navigation.js
279 279 // Remove Focused elements in sibling div 280 280 var currentDiv = getCurrentParent( event.target, 'div', '.main-navigation' ); 281 281 var currentDivSibling = currentDiv.previousElementSibling === null ? currentDiv.nextElementSibling : currentDiv.previousElementSibling; 282 283 if ( ! currentDivSibling ) { 284 return; 285 } 286 282 287 var focusedElement = currentDivSibling.querySelector( '.is-focused' ); 283 288 var focusedClass = 'is-focused'; 284 289 var prevLi = getCurrentParent( event.target, '.main-navigation > div > ul > li', '.main-navigation' ).previousElementSibling;