#14103 closed defect (fixed)
Calling dojo/domstyle.getComputedStyle on svg elements fails under IE9
Reported by: | Patrick Ruzand | Owned by: | Kenneth G. Franqueiro |
---|---|---|---|
Priority: | high | Milestone: | 1.5.2 |
Component: | Core | Version: | 1.5 |
Keywords: | Cc: | cjolif | |
Blocked By: | Blocking: |
Description
Calling dojo/domstyle.getComputedStyle on svg elements fails under IE9. The problem seems to come from the getComputedStyle impl., that assumes the currentStyle property is defined for all nodes of type Element under IEs:
}else if(has("ie")){
getComputedStyle = function(node){ IE (as of 7) doesn't expose Element like sane browsers return node.nodeType == 1 /* ELEMENT_NODE*/ ? node.currentStyle : {};
};
This is not true when the node is an SVG element. In this case, currentStyle is not defined (window.getComputedStyle shouldn't be used instead in the case currentStyle is undefined ?).
Attached a simple testcase to be put in the dojo distrib root directory. It works on the other browsers (FF7, Chrome).
Attachments (2)
Change History (15)
Changed 9 years ago by
Attachment: | getComputedStyle.html added |
---|
comment:2 Changed 9 years ago by
Milestone: | 1.7 → 1.7.1 |
---|
comment:3 Changed 9 years ago by
Owner: | set to Eugene Lazutkin |
---|
comment:4 Changed 9 years ago by
Milestone: | 1.7.1 → 1.8 |
---|---|
Priority: | high → normal |
This bug is reproducible on older versions of dojo as well; bumping to 1.8 as such. I'll attach a version of the test that can reproduce this on 1.6.
Changed 9 years ago by
Attachment: | getComputedStyle-1.6.html added |
---|
version of test runnable against non-AMD versions of dojo
comment:5 Changed 9 years ago by
I should clarify that if we do find a fix for this, I'd totally be for backporting it as far as we see fit for the sake of fixing browser compatibility.
comment:6 Changed 9 years ago by
Note that this bug prevent the gfx bidi extension to run under IE9 (run the dojox/gfx/tests/_gfxBidiSupport/testBidi.html *in IE9 standard mode*)
comment:7 Changed 9 years ago by
Cc: | cjolif added |
---|
comment:8 Changed 9 years ago by
Priority: | normal → high |
---|
comment:9 Changed 9 years ago by
Milestone: | 1.8 → 1.5.2 |
---|---|
Owner: | changed from Eugene Lazutkin to Kenneth G. Franqueiro |
Status: | new → assigned |
Version: | → 1.5 |
I'll be committing the fix for this as well as adding a test to dojo/tests/_base/html.html in trunk and branches for 1.5 through 1.7.
test file, to be put in the dojo distrib root directory