[Pkg-javascript-commits] [dojo] 94/149: has("webkit") and has("mozilla") should also be falsy for Edge, refs #18172

David Prévot taffit at moszumanska.debian.org
Sat Feb 27 03:13:51 UTC 2016


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

taffit pushed a commit to branch master
in repository dojo.

commit 6bafb16c544c7dff015bb04aea9dfedcf7c430e6
Author: Bill Keese <bill at dojotoolkit.org>
Date:   Tue Oct 20 10:18:46 2015 +0900

    has("webkit") and has("mozilla") should also be falsy for Edge, refs #18172
---
 sniff.js  | 6 +++---
 window.js | 5 +++--
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/sniff.js b/sniff.js
index 374acaf..136111e 100644
--- a/sniff.js
+++ b/sniff.js
@@ -19,9 +19,9 @@ define(["./has"], function(has){
 		has.add("wp", parseFloat(dua.split("Windows Phone")[1]) || undefined);
 		has.add("msapp", parseFloat(dua.split("MSAppHost/")[1]) || undefined);
 		has.add("khtml", dav.indexOf("Konqueror") >= 0 ? tv : undefined);
-		has.add("webkit", !has("wp") // NOTE: necessary since Windows Phone 8.1 Update 1, see #18540
-				&& parseFloat(dua.split("WebKit/")[1]) || undefined);
 		has.add("edge", parseFloat(dua.split("Edge/")[1]) || undefined);
+		has.add("webkit", !has("wp") // NOTE: necessary since Windows Phone 8.1 Update 1, see #18540
+			&& !has("edge") && parseFloat(dua.split("WebKit/")[1]) || undefined);
 		has.add("chrome", !has("edge")
 				&& parseFloat(dua.split("Chrome/")[1]) || undefined);
 		has.add("android", !has("wp") // NOTE: necessary since Windows Phone 8.1 Update 1, see #18528
@@ -55,7 +55,7 @@ define(["./has"], function(has){
 
 			// Mozilla and firefox
 			if(dua.indexOf("Gecko") >= 0 && !has("wp") // NOTE: necessary since Windows Phone 8.1 Update 1
-					&& !has("khtml") && !has("webkit") && !has("trident")){
+					&& !has("khtml") && !has("trident") && !has("edge")){
 				has.add("mozilla", tv);
 			}
 			if(has("mozilla")){
diff --git a/window.js b/window.js
index 89cf58d..13f77a6 100644
--- a/window.js
+++ b/window.js
@@ -130,11 +130,12 @@ define(["./_base/lang", "./sniff", "./_base/window", "./dom", "./dom-geometry",
 				var	doc = node.ownerDocument || baseWindow.doc,	// TODO: why baseWindow.doc?  Isn't node.ownerDocument always defined?
 					body = baseWindow.body(doc),
 					html = doc.documentElement || body.parentNode,
-					isIE = has("ie"),
+					isIE = has("ie") || has("trident"),
 					isWK = has("webkit");
 				// if an untested browser, then use the native method
 				if(node == body || node == html){ return; }
-				if(!(has("mozilla") || isIE || isWK || has("opera") || has("trident")) && ("scrollIntoView" in node)){
+				if(!(has("mozilla") || isIE || isWK || has("opera") || has("trident") || has("edge"))
+						&& ("scrollIntoView" in node)){
 					node.scrollIntoView(false); // short-circuit to native if possible
 					return;
 				}

-- 
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