Ticket #6791: dijit._Templated.js.patch

File dijit._Templated.js.patch, 1.0 kB (added by chrism, 6 months ago)

updated patch file #2 (must be applied along with the other update to work

  • C:/work/code/zero/dijit/_Templated.js

     
    209209        var key = templateString || templatePath; 
    210210        var cached = tmplts[key]; 
    211211        if(cached){ 
    212                 return cached; 
     212                if(!cached.ownerDocument || cached.ownerDocument == dojo.doc){ 
     213                        // string or node of the same document 
     214                        return cached; 
     215                } 
     216                // destroy the old cached node of a different document 
     217                dojo._destroyElement(cached); 
    213218        } 
    214219 
    215220        // If necessary, load template string from template path 
     
    273278                // summary: 
    274279                //      Attempts to create a set of nodes based on the structure of the passed text. 
    275280 
     281                if(tn && tn.ownerDocument != dojo.doc){ 
     282                        // destroy dummy container of a different document 
     283                        dojo._destroyElement(tn); 
     284                        tn = undefined; 
     285                } 
    276286                if(!tn){ 
    277287                        tn = dojo.doc.createElement("div"); 
    278288                        tn.style.display="none";