Permalink
Browse files

Fix: IE6/7 when scrolling is enabled could loose the sorting event du…

…e to the way cloned nodes work in those browsers. Note that this was introduced after 1.9.0. Related - jQuery bug 10437 - http://bugs.jquery.com/ticket/10437
  • Loading branch information...
1 parent 447a586 commit 225fc0835cd0580d330fe394008f76e91be992dc @DataTables DataTables committed with Apr 2, 2012
Showing with 6 additions and 6 deletions.
  1. +3 −3 media/js/jquery.dataTables.js
  2. +3 −3 media/src/core/core.scrolling.js
@@ -3072,14 +3072,14 @@
/* Remove the old minimised thead and tfoot elements in the inner table */
$(o.nTable).children('thead, tfoot').remove();
-
+
/* Clone the current header and footer elements and then place it into the inner table */
- nTheadSize = o.nTHead.cloneNode(true);
+ nTheadSize = $(o.nTHead).clone()[0];
o.nTable.insertBefore( nTheadSize, o.nTable.childNodes[0] );
if ( o.nTFoot !== null )
{
- nTfootSize = o.nTFoot.cloneNode(true);
+ nTfootSize = $(o.nTFoot).clone()[0];
o.nTable.insertBefore( nTfootSize, o.nTable.childNodes[1] );
}
@@ -193,14 +193,14 @@ function _fnScrollDraw ( o )
/* Remove the old minimised thead and tfoot elements in the inner table */
$(o.nTable).children('thead, tfoot').remove();
-
+
/* Clone the current header and footer elements and then place it into the inner table */
- nTheadSize = o.nTHead.cloneNode(true);
+ nTheadSize = $(o.nTHead).clone()[0];
o.nTable.insertBefore( nTheadSize, o.nTable.childNodes[0] );
if ( o.nTFoot !== null )
{
- nTfootSize = o.nTFoot.cloneNode(true);
+ nTfootSize = $(o.nTFoot).clone()[0];
o.nTable.insertBefore( nTfootSize, o.nTable.childNodes[1] );
}

0 comments on commit 225fc08

Please sign in to comment.