Ticket #6791: Templated.patch

File Templated.patch, 0.9 kB (added by bill, 8 months ago)

couldn't apply the old patch so here's a new one, but unfortunately doesn't fix the problem

  • workspace/trunk/dijit/_Templated.js

     
    6969                                node = dijit._Templated._createNodesFromText(this._stringRepl(cached))[0]; 
    7070                        }else{ 
    7171                                // if it's a node, all we have to do is clone it 
    72                                 node = cached.cloneNode(true); 
     72                                if(cached.ownerDocument == dojo.doc){ 
     73                                        node = cached.cloneNode(true); 
     74                                }else{ 
     75                                        node = dojo.doc.importNode(cached, true); 
     76                                } 
    7377                        } 
    7478 
    7579                        // recurse through the node, looking for, and attaching to, our 
     
    273277                // summary: 
    274278                //      Attempts to create a set of nodes based on the structure of the passed text. 
    275279 
    276                 if(!tn){ 
     280                if(!tn || tn.ownerDocument != dojo.doc){ 
    277281                        tn = dojo.doc.createElement("div"); 
    278282                        tn.style.display="none"; 
    279283                        dojo.body().appendChild(tn);