[Pkg-javascript-commits] [dojo] 33/88: IE9+ do not have bugs in offsets, so stop trying to "fix" them. This is why browser sniffs are bad. Refs #12342. Backport to 1.8.
David Prévot
taffit at moszumanska.debian.org
Thu Aug 21 17:39:34 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag 1.8.5
in repository dojo.
commit 0e3e0804022f0547a57e570a83f9a56576b40f25
Author: Colin Snover <github.com at zetafleet.com>
Date: Fri Nov 23 02:24:47 2012 +0000
IE9+ do not have bugs in offsets, so stop trying to "fix" them. This is why browser sniffs are bad. Refs #12342.
Backport to 1.8.
git-svn-id: http://svn.dojotoolkit.org/src/branches/1.8/dojo@30006 560b804f-0ae3-0310-86f3-f6aa0a117693
---
dom-geometry.js | 4 ++--
tests/_base/html_quirks.html | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dom-geometry.js b/dom-geometry.js
index 5bf4656..447acfe 100644
--- a/dom-geometry.js
+++ b/dom-geometry.js
@@ -529,8 +529,8 @@ define(["./sniff", "./_base/window","./dom", "./dom-style"],
ret = node.getBoundingClientRect();
ret = {x: ret.left, y: ret.top, w: ret.right - ret.left, h: ret.bottom - ret.top};
- if(has("ie")){
- // On IE there's a 2px offset that we need to adjust for, see dojo.getIeDocumentElementOffset()
+ if(has("ie") && has("ie") < 9){
+ // On IE<9 there's a 2px offset that we need to adjust for, see dojo.getIeDocumentElementOffset()
var offset = geom.getIeDocumentElementOffset(node.ownerDocument);
// fixes the position in IE, quirks mode
diff --git a/tests/_base/html_quirks.html b/tests/_base/html_quirks.html
index 44c135e..b228ec9 100644
--- a/tests/_base/html_quirks.html
+++ b/tests/_base/html_quirks.html
@@ -66,7 +66,7 @@
}
]
);
- if(has("ie") <= 9){
+ if(has("ie") && has("ie") < 9){
// IE collapses padding in quirks mode. We just report on it.
doh.register("t",
[
--
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