Login Register

[Solved] Charting don't working under Firefox 3

With Firefox 3 (tested v. 3.0.1) charting don't works. Also the simple test:

http://download.dojotoolkit.org/release-0.4.3/dojo-0.4.3-src/tests/chart...

It seems that SVG support is not properly detected: variable dojo.render.svg.capable stores false instead of true.

Of course the solution is simple:

if (isFirefox3)
{
    dojo.render.svg.capable = true;
}

Someone can help me to patch this bug? Where, in code, the browser is detected? Where I can apply the above patch?

Solved: patch

Problem solved: Firefox 3 have changed the way to detect for SVG support. This is the patch against "dojo-0.4.3-charting".

Index: dojo.js
===================================================================
--- dojo.js     (revision 516)
+++ dojo.js     (working copy)
@@ -685,7 +685,7 @@
 drs.support.builtin=f;
 var _b5=window["document"];
 var tdi=_b5["implementation"];
-if((tdi)&&(tdi["hasFeature"])&&(tdi.hasFeature("org.w3c.dom.svg","1.0"))){
+if((tdi)&&(tdi["hasFeature"])&&(tdi.hasFeature("org.w3c.dom.svg","1.0")||tdi.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"))){
 drs.capable=t;
 drs.support.builtin=t;
 drs.support.plugin=f;
Index: src/hostenv_browser.js
===================================================================
--- src/hostenv_browser.js      (revision 516)
+++ src/hostenv_browser.js      (working copy)
@@ -94,7 +94,7 @@
               drs.support.builtin = f;
               var tdoc = window["document"];
               var tdi = tdoc["implementation"];
-              if ((tdi) && (tdi["hasFeature"]) && (tdi.hasFeature("org.w3c.dom.svg", "1.0"))) {
+              if ((tdi) && (tdi["hasFeature"]) && (tdi.hasFeature("org.w3c.dom.svg", "1.0") || tdi.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"))) {
                      drs.capable = t;
                      drs.support.builtin = t;
                      drs.support.plugin = f;

Happy hacking,
Daniele Benegiamo.