Merge pull request #1053 from samikeijonen/issue/1046

Fix skip link focus for IE11: props @samikeijonen
This commit is contained in:
Tammie Lister 2016-12-23 14:26:19 +00:00 committed by GitHub
commit 33a777556f
1 changed files with 3 additions and 5 deletions

View File

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