Changeset 44358
- Timestamp:
- 12/21/2018 09:35:48 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentynineteen/js/touch-keyboard-navigation.js
r44149 r44358 220 220 var url = event.target.getAttribute( 'href' ) ? event.target.getAttribute( 'href' ) : ''; 221 221 222 // If there’s a link, go to it on touchend223 if ( '#' !== url && '' !== url ) {224 window.location = url;225 226 222 // Open submenu if url is # 227 } else if ( '#' === url && event.target.nextSibling.matches('.submenu-expand') ) { 228 223 if ( '#' === url && event.target.nextSibling.matches('.submenu-expand') ) { 229 224 openSubMenu( event.target ); 230 231 // Prevent default touch events232 } else {233 234 event.preventDefault();235 225 } 236 226 }
Note: See TracChangeset
for help on using the changeset viewer.