[Pkg-javascript-commits] [dojo] 01/27: Fix IE11 sniffing. Fixes #17311. (cherry picked from commit f58c0e19ce509398985908688a768c8fb41191b8) (cherry picked from commit 28e1f7c31de5a407a0c095038bf851518085bffc)

David Prévot taffit at moszumanska.debian.org
Sun Sep 14 16:23:04 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag 1.7.6
in repository dojo.

commit 926898da2934cdfba9c99c11a25a8c9080811f35
Author: mahays0 <mahays0 at gmail.com>
Date:   Mon Aug 5 10:53:43 2013 -0400

    Fix IE11 sniffing. Fixes #17311.
    (cherry picked from commit f58c0e19ce509398985908688a768c8fb41191b8)
    (cherry picked from commit 28e1f7c31de5a407a0c095038bf851518085bffc)
    
    Conflicts:
    	sniff.js
    	window.js
---
 _base/sniff.js | 23 ++++++++++++++++-------
 window.js      |  2 +-
 2 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/_base/sniff.js b/_base/sniff.js
index 948efbf..3b4b0f6 100644
--- a/_base/sniff.js
+++ b/_base/sniff.js
@@ -143,15 +143,15 @@ define(["./kernel", "../has"], function(dojo, has){
 			}
 		}
 
-		if(dua.indexOf("Gecko") >= 0 && !isKhtml && !isWebKit){
-			isMozilla = isMoz = tv;
-		}
-		if(isMoz){
-			//We really need to get away from this. Consider a sane isGecko approach for the future.
-			isFF = parseFloat(dua.split("Firefox/")[1] || dua.split("Minefield/")[1]) || undefined;
+		isIE = 0;
+		if(document.all && !has("opera")){
+			// IE < 11
+			isIE = parseFloat(dav.split("MSIE ")[1]) || undefined;
+		}else if(dav.indexOf("Trident")){
+			// IE >= 9
+			isIE = parseFloat(dav.split("rv:")[1]) || undefined;
 		}
 		if(document.all && !isOpera){
-			isIE = parseFloat(dav.split("MSIE ")[1]) || undefined;
 			//In cases where the page has an HTTP header or META tag with
 			//X-UA-Compatible, then it is in emulation mode.
 			//Make sure isIE reflects the desired version.
@@ -163,6 +163,15 @@ define(["./kernel", "../has"], function(dojo, has){
 				isIE = mode;
 			}
 		}
+		
+		// Mozilla and firefox
+		if(!isIE && dua.indexOf("Gecko") >= 0 && !isKhtml && !isWebKit){
+			isMozilla = isMoz = tv;
+		}
+		if(isMoz){
+			//We really need to get away from this. Consider a sane isGecko approach for the future.
+			isFF = parseFloat(dua.split("Firefox/")[1] || dua.split("Minefield/")[1]) || undefined;
+		}
 	}
 
 	isQuirks = document.compatMode == "BackCompat";
diff --git a/window.js b/window.js
index 8f1203e..f7aa3ad 100644
--- a/window.js
+++ b/window.js
@@ -104,7 +104,7 @@ window.get = function(doc){
 	// reference to the real window object (maybe a copy), so we must fix it as well
 	// We use IE specific execScript to attach the real window reference to
 	// document._parentWindow for later use
-	if(has("ie") && window !== document.parentWindow){
+	if(has("ie") < 9 && window !== document.parentWindow){
 		/*
 		In IE 6, only the variable "window" can be used to connect events (others
 		may be only copies).

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git



More information about the Pkg-javascript-commits mailing list