Changeset 29897
- Timestamp:
- 10/15/2014 05:48:05 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyfifteen/js/skip-link-focus-fix.js
r29892 r29897 7 7 8 8 ( function() { 9 var is_webkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1, 10 is_opera = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1, 11 is_ie = navigator.userAgent.toLowerCase().indexOf( 'msie' ) > -1; 9 var ua = navigator.userAgent.toLowerCase(); 12 10 13 if ( ( is_webkit || is_opera || is_ie ) && document.getElementById && window.addEventListener ) { 11 if ( ( ua.indexOf( 'webkit' ) > -1 || ua.indexOf( 'opera' ) > -1 || ua.indexOf( 'msie' ) > -1 ) && 12 document.getElementById && window.addEventListener ) { 13 14 14 window.addEventListener( 'hashchange', function() { 15 15 var element = document.getElementById( location.hash.substring( 1 ) ); 16 16 17 17 if ( element ) { 18 if ( ! /^(?:a|select|input|button|textarea)$/i.test( element. tagName ) ) {18 if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.nodeName ) ) { 19 19 element.tabIndex = -1; 20 20 }
Note: See TracChangeset
for help on using the changeset viewer.