| 1 | Index: C:/workspace/dijit/_Templated.js
|
|---|
| 2 | ===================================================================
|
|---|
| 3 | --- C:/workspace/dijit/_Templated.js (revision 3230)
|
|---|
| 4 | +++ C:/workspace/dijit/_Templated.js (working copy)
|
|---|
| 5 | @@ -75,7 +75,11 @@
|
|---|
| 6 | node = dijit._Templated._createNodesFromText(this._stringRepl(cached))[0];
|
|---|
| 7 | }else{
|
|---|
| 8 | // if it's a node, all we have to do is clone it
|
|---|
| 9 | - node = cached.cloneNode(true);
|
|---|
| 10 | + if(cached.ownerDocument == dojo.doc){
|
|---|
| 11 | + node = cached.cloneNode(true);
|
|---|
| 12 | + }else{
|
|---|
| 13 | + node = dojo.doc.importNode(cached, true);
|
|---|
| 14 | + }
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | // recurse through the node, looking for, and attaching to, our
|
|---|
| 18 | @@ -279,7 +283,7 @@
|
|---|
| 19 | // summary:
|
|---|
| 20 | // Attempts to create a set of nodes based on the structure of the passed text.
|
|---|
| 21 |
|
|---|
| 22 | - if(!tn){
|
|---|
| 23 | + if(!tn || tn.ownerDocument != dojo.doc){
|
|---|
| 24 | tn = dojo.doc.createElement("div");
|
|---|
| 25 | tn.style.display="none";
|
|---|
| 26 | dojo.body().appendChild(tn);
|
|---|