From 8589ebef0d8002439d6aee2748536b02ad138c06 Mon Sep 17 00:00:00 2001 From: Mark Salsbery Date: Sat, 19 Apr 2014 12:10:48 -0700 Subject: [PATCH] Fix for IE 11 Browser Detection Proposed temporary fix until we don't need browser sniffing anymore. --- src/openseadragon.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/openseadragon.js b/src/openseadragon.js index c7f69749..655d7fb4 100644 --- a/src/openseadragon.js +++ b/src/openseadragon.js @@ -2080,7 +2080,8 @@ window.OpenSeadragon = window.OpenSeadragon || function( options ){ //version and supporting feature sets. var app = navigator.appName, ver = navigator.appVersion, - ua = navigator.userAgent; + ua = navigator.userAgent, + regex; //console.error( 'appName: ' + navigator.appName ); //console.error( 'appVersion: ' + navigator.appVersion ); @@ -2116,6 +2117,12 @@ window.OpenSeadragon = window.OpenSeadragon || function( options ){ ua.indexOf( "Safari" ) ) ); + } else { + regex = new RegExp( "Trident/.*rv:([0-9]{1,}[.0-9]{0,}) "); + if ( regex.exec( ua ) !== null ) { + $.Browser.vendor = $.BROWSERS.IE; + $.Browser.version = parseFloat( RegExp.$1 ); + } } } break;