Opened 10 years ago
Closed 10 years ago
#12916 closed defect (fixed)
[patch][ccla] dojox.gfx.utils.toSvg() broken under IE8 (in ie8 mode)
Reported by: | Patrick Ruzand | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | DojoX GFX | Version: | 1.5 |
Keywords: | 1.7-mobile | Cc: | [email protected]… |
Blocked By: | Blocking: |
Description
The dojox.gfx.utils.toSvg function does not work on IE8 (in IE8 standards mode). The callback of the returned Deferred object seems never to be called. This can be reproduced by running the test case: dojox/gfx/tests/test_utils.html on IE8 (make sure to run it o IE8 standards mode).
The issue is indeed specific to IE8, and lies in the dojox/gfx/utils.js file, l.233:
var uri = (dojo.config["dojoxGfxSvgProxyFrameUrl"]||dojo. moduleUrl("dojox","gfx/resources/gfxSvgProxyFrame.html")); f.setAttribute("src", uri);
Here, 'uri' is a dojo url object (whose toString() has been overriden to return the uri as a string). In 1.6, f.setAttribute(...) invokes the uri toString() method, so it gives something like:
src = "http://blablabla/../../../dojox/gfx/resources/thegfxproxy.html";
in IE8, the toString() is not invoked anymore, and the result is :
src = "../../../blabalbla/[object]
According to msdn (http://msdn.microsoft.com/en-us/library/ms534643(VS.85).aspx), IE8 does not support "DHTML expressions" for the attribute value anymore. I guess a JavaScript? object fells into this category and explain the faulty behavior.
the fix is to explicitely call uri.toString() when setting 'src' attribute:
f.setAttribute("src", uri.toString());
Attachments (1)
Change History (2)
Changed 10 years ago by
Attachment: | 12916.patch added |
---|
comment:1 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [24920]) fixes #12916 dojox.gfx.utils.toSvg() broken under IE8 in ie8 mode