diff options
author | David Serduke <davidserduke@gmail.com> | 2007-12-05 00:26:13 +0000 |
---|---|---|
committer | David Serduke <davidserduke@gmail.com> | 2007-12-05 00:26:13 +0000 |
commit | 74a132d944886379456d562990c8fb217ab332e3 (patch) | |
tree | 1459a738c7a6303c3a4ebbe88a2a5dbf92268d25 /src | |
parent | c424e79ccb3695c6ff599e77bec867c6644ccc98 (diff) | |
download | jquery-74a132d944886379456d562990c8fb217ab332e3.tar.gz jquery-74a132d944886379456d562990c8fb217ab332e3.zip |
Fixed #1264. If you read the bug there were many proposed changes. As it turned out most of them had already been implemented. The last ones necessary were in .domManip() with when a <table> was 'this' and for .text(). Adding these last changes seems to make dom and text manipulation in IE frames possible. Unit test cases were added as well.
In addition "submit.gif" was removed from the test suite index.html since it didn't exist.
Diffstat (limited to 'src')
-rw-r--r-- | src/core.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core.js b/src/core.js index ce487a10f..0f274255f 100644 --- a/src/core.js +++ b/src/core.js @@ -202,7 +202,7 @@ jQuery.fn = jQuery.prototype = { text: function( text ) { if ( typeof text != "object" && text != null ) - return this.empty().append( document.createTextNode( text ) ); + return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); var ret = ""; @@ -468,7 +468,7 @@ jQuery.fn = jQuery.prototype = { var obj = this; if ( table && jQuery.nodeName( this, "table" ) && jQuery.nodeName( elems[0], "tr" ) ) - obj = this.getElementsByTagName("tbody")[0] || this.appendChild( document.createElement("tbody") ); + obj = this.getElementsByTagName("tbody")[0] || this.appendChild( this.ownerDocument.createElement("tbody") ); var scripts = jQuery( [] ); |