bump to 1.19.4
This commit is contained in:
28
js/script.js
28
js/script.js
@ -131,24 +131,20 @@ pressbook.setupMainMenu = {
|
||||
const isClickInside = nav.contains( event.target );
|
||||
|
||||
if ( ! isClickInside ) {
|
||||
nav.classList.remove( 'toggled' );
|
||||
if ( ! nav.classList.contains( 'toggled' ) ) {
|
||||
// Remove all the focus classes in the ul.
|
||||
[].forEach.call( nav.querySelectorAll( '.focus' ), function( li ) {
|
||||
li.classList.remove( 'focus' );
|
||||
} );
|
||||
|
||||
if ( button ) {
|
||||
button.setAttribute( 'aria-expanded', 'false' );
|
||||
// Set aria-expanded to false.
|
||||
[].forEach.call( nav.querySelectorAll( '.main-navigation-arrow-btn' ), function( button ) {
|
||||
button.setAttribute( 'aria-expanded', 'false' );
|
||||
} );
|
||||
|
||||
// Collapse search form.
|
||||
that.collapseSearchForm( nav );
|
||||
}
|
||||
|
||||
// Remove all the focus classes in the ul.
|
||||
[].forEach.call( nav.querySelectorAll( '.focus' ), function( li ) {
|
||||
li.classList.remove( 'focus' );
|
||||
} );
|
||||
|
||||
// Set aria-expanded to false.
|
||||
[].forEach.call( nav.querySelectorAll( '.main-navigation-arrow-btn' ), function( button ) {
|
||||
button.setAttribute( 'aria-expanded', 'false' );
|
||||
} );
|
||||
|
||||
// Collapse search form.
|
||||
that.collapseSearchForm( nav );
|
||||
}
|
||||
} );
|
||||
},
|
||||
|
2
js/script.min.js
vendored
2
js/script.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user