Skip to content

Commit

Permalink
Fix: IE8 compatiblity. Child rows couldn't be shown.
Browse files Browse the repository at this point in the history
- The issue is related to the cloned nodes used for measurement. It
  appears that when the cloned element is removed (cloned using
  `cloneNode`) IE8 also removed the event handler from the original.
  Very not useful.
- Fix is to use jQuery to clone the table. Its going to be slower
  unfortunately, but it does at least seperate the elements properly.
  • Loading branch information
AllanJard committed Jan 20, 2016
1 parent 9c0618e commit fd89905
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/dataTables.responsive.js
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ $.extend( Responsive.prototype, {
var columnWidths = dt.columns;
var clonedTable = dt.table().node().cloneNode( false );
var clonedHeader = $( dt.table().header().cloneNode( false ) ).appendTo( clonedTable );
var clonedBody = $( dt.table().body().cloneNode( false ) ).appendTo( clonedTable );
var clonedBody = $( dt.table().body() ).clone( false, false ).empty().appendTo( clonedTable ); // use jQuery because of IE8

// Header
var headerCells = dt.columns()
Expand Down

0 comments on commit fd89905

Please sign in to comment.