[Pkg-javascript-commits] [dojo] 11/23: fix dom-style.get for IE11+, fixes #17962
David Prévot
taffit at moszumanska.debian.org
Sun Sep 14 16:23:11 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag 1.9.4
in repository dojo.
commit d83ef4e4f47234952cf2d4db4f63007526eddd46
Author: Bill Keese <bill at dojotoolkit.org>
Date: Fri May 9 09:03:30 2014 +0900
fix dom-style.get for IE11+, fixes #17962
(cherry picked from commit f5712e10969c16b14e591a2bec037758d6e86e9a)
---
dom-style.js | 2 +-
tests/dom-style.html | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/dom-style.js b/dom-style.js
index 2d498a1..0c871ba 100644
--- a/dom-style.js
+++ b/dom-style.js
@@ -199,7 +199,7 @@ define(["./sniff", "./dom"], function(has, dom){
function _toStyleValue(node, type, value){
//TODO: should we really be doing string case conversion here? Should we cache it? Need to profile!
type = type.toLowerCase();
- if(has("ie")){
+ if(has("ie") || has("trident")){
if(value == "auto"){
if(type == "height"){ return node.offsetHeight; }
if(type == "width"){ return node.offsetWidth; }
diff --git a/tests/dom-style.html b/tests/dom-style.html
index 86849e4..e36aa4c 100644
--- a/tests/dom-style.html
+++ b/tests/dom-style.html
@@ -30,6 +30,11 @@
doh.t(false);
}
}
+ },
+ function getWidth(){
+ // see http://bugs.dojotoolkit.org/ticket/17962
+ var rowWidth = domStyle.get(dom.byId("trow"), "width");
+ doh.t(rowWidth > 0, "width: " + rowWidth);
}
]);
@@ -39,5 +44,6 @@
</head>
<body>
<div id="node" style="padding: 1px 2px 3px 4px;"></div>
+ <table><tbody><tr id="trow"><td>Col A</td><td>Col B</td></tr></tbody></table>
</body>
</html>
--
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