Fix skip link focus.

This commit is contained in:
Sami Keijonen 2016-11-26 19:42:51 +02:00
parent 4aa1e19a5a
commit 9a988eae35
1 changed files with 3 additions and 5 deletions

View File

@ -5,12 +5,10 @@
* *
* Learn more: https://git.io/vWdr2 * Learn more: https://git.io/vWdr2
*/ */
( function() { (function() {
var isWebkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1, var isIe = /(trident|msie)/i.test( navigator.userAgent );
isOpera = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1,
isIe = navigator.userAgent.toLowerCase().indexOf( 'msie' ) > -1;
if ( ( isWebkit || isOpera || isIe ) && document.getElementById && window.addEventListener ) { if ( isIe && document.getElementById && window.addEventListener ) {
window.addEventListener( 'hashchange', function() { window.addEventListener( 'hashchange', function() {
var id = location.hash.substring( 1 ), var id = location.hash.substring( 1 ),
element; element;