Hi. I'm a starter theme called _s, or underscores, if you like. I'm a theme meant for hacking so don't use me as a Parent Theme. Instead try turning me into the next, most awesome, WordPress theme out there. That's what I'm here for.
Currently navigation.js (line: 102) defines a touchstart event listener with an options parameter of false. Modern best practices recommend using passive listeners to improve scrolling performance on mobile devices.
As an example:
parentLink[i].addEventListener( 'touchstart', touchStartFn, false );
would become:
parentLink[i].addEventListener( 'touchstart', touchStartFn, { passive: true } );
Cancel this. Setting passive to true prevents expand / collapse of menu items on touch devices. The potential performance gains in Chrome do not justify rewriting working code.
Currently navigation.js (line: 102) defines a
touchstart
event listener with anoptions
parameter offalse
. Modern best practices recommend using passive listeners to improve scrolling performance on mobile devices.As an example:
parentLink[i].addEventListener( 'touchstart', touchStartFn, false );
would become:parentLink[i].addEventListener( 'touchstart', touchStartFn, { passive: true } );