diff --git a/.datatables-commit-sync b/.datatables-commit-sync index 891685ff..c86b5543 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -fb8a718af86bdcb880606e67c30bd118e3efd174 +d8efc98282583e4661bb38af9449f0fa4bb79996 diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index 2d35f724..e8be88af 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -8548,24 +8548,26 @@ new _Api( settings ).columns().visible( true ); } - // Blitz all DT events + // Blitz all `DT` namespaced events (these are internal events, the + // lowercase, `dt` events are user subscribed and they are responsible + // for removing them jqWrapper.unbind('.DT').find(':not(tbody *)').unbind('.DT'); $(window).unbind('.DT-'+settings.sInstance); // When scrolling we had to break the table up - restore it if ( table != thead.parentNode ) { - jqTable.children('thead').remove(); + jqTable.children('thead').detach(); jqTable.append( thead ); } if ( tfoot && table != tfoot.parentNode ) { - jqTable.children('tfoot').remove(); + jqTable.children('tfoot').detach(); jqTable.append( tfoot ); } // Remove the DataTables generated nodes, events and classes - jqTable.remove(); - jqWrapper.remove(); + jqTable.detach(); + jqWrapper.detach(); settings.aaSorting = []; settings.aaSortingFixed = []; @@ -8578,11 +8580,11 @@ ); if ( settings.bJUI ) { - $('th span.'+classes.sSortIcon+ ', td span.'+classes.sSortIcon, thead).remove(); + $('th span.'+classes.sSortIcon+ ', td span.'+classes.sSortIcon, thead).detach(); $('th, td', thead).each( function () { var wrapper = $('div.'+classes.sSortJUIWrapper, this); $(this).append( wrapper.contents() ); - wrapper.remove(); + wrapper.detach(); } ); }