File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 106
106
107
107
function showNav ( e ) {
108
108
if ( navToggle . classList . contains ( 'is-active' ) ) return hideNav ( e )
109
+ var navBounds = nav . getBoundingClientRect ( )
110
+ var expectedNavHeight = window . innerHeight - Math . round ( navBounds . top )
111
+ if ( Math . round ( navBounds . height ) !== expectedNavHeight ) nav . style . height = expectedNavHeight + 'px'
109
112
var html = document . documentElement
110
113
html . classList . add ( 'is-clipped--nav' )
111
114
navToggle . classList . add ( 'is-active' )
142
145
143
146
function findNextElement ( from , selector ) {
144
147
var el = from . nextElementSibling
145
- if ( ! el ) return
146
- return selector ? el [ el . matches ? 'matches' : 'msMatchesSelector' ] ( selector ) && el : el
148
+ return el && selector ? el [ el . matches ? 'matches' : 'msMatchesSelector' ] ( selector ) && el : el
147
149
}
148
150
} ) ( )
You can’t perform that action at this time.
0 commit comments