I have touchstart to close sub menus on a mobile responsive menu. Unfortunatley on Safari this doesn't work. In other browsers it also sometimes gets stuck.
if ( event.type === 'touchstart' ) {
const menuItem = this.parentNode;
if ( event.cancelable ) event.preventDefault();
for ( const link of menuItem.parentNode.children ) {
if ( menuItem !== link ) {
link.classList.remove( 'focus' );
}
}
menuItem.classList.toggle( 'focus' );
}