Skip to content

Commit

Permalink
Fix: IE8 would only allow row reordering to happen once.
Browse files Browse the repository at this point in the history
- This appears to be because the mousedown event simply wasn't
  triggering again - assigning the delegated event listener to the
  wrapper addresses this issue. Absolutely no idea why it doesn't work
  as it should in IE8.
- Thread 30717
  • Loading branch information
Allan Jardine committed Oct 13, 2015
1 parent fa32e99 commit ac6d545
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/dataTables.rowReorder.js
Expand Up @@ -150,8 +150,10 @@ $.extend( RowReorder.prototype, {
// listen for mouse down on the target column - we have to implement
// this rather than using HTML5 drag and drop as drag and drop doesn't
// appear to work on table rows at this time. Also mobile browsers are
// not supported
$( table ).on( 'mousedown.rowReorder touchstart.rowReorder', this.c.selector, function (e) {
// not supported.
// Use `table().container()` rather than just the table node for IE8 -
// otherwise it only works once...
$(dt.table().container()).on( 'mousedown.rowReorder touchstart.rowReorder', this.c.selector, function (e) {
var tr = $(this).closest('tr');

// Double check that it is a DataTable row
Expand Down

0 comments on commit ac6d545

Please sign in to comment.