Skip to content

Commit

Permalink
fix dom-style.get for IE11+, fixes #17962
Browse files Browse the repository at this point in the history
  • Loading branch information
wkeese committed May 9, 2014
1 parent 7a7a097 commit fcdd8c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dom-style.js
Expand Up @@ -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; }
Expand Down
6 changes: 6 additions & 0 deletions tests/dom-style.html
Expand Up @@ -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);
}
]);

Expand All @@ -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>

0 comments on commit fcdd8c1

Please sign in to comment.