reordering columns breaks keyboard based sorting
reordering columns breaks keyboard based sorting
Demo: https://datatables.net/extensions/colreorder/examples/initialisation/simple.html
Instructions: First, confirm that keyboard based sorting is working. Tab to a column header and hit enter, it should sort ascending, hit enter again, it sorts descending. Now, reorder any column by dragging it to a new position. Tab back to a column header and hit enter. The column sorts either ascending or descending (whatever it was last sorted by). Hit enter again, the sort direction does not change.
Any workaround for this?
Edited to add: tested this in Chrome, Firefox, and Edge and they all have the same problem. No errors in javascript console.
Answers
Same issue for me. It appears in my case the aoDrawCallback event is being fired twice in the datatables library which is resulting in the following order sorting method being called twice.
_fnCallbackFire( oSettings, null, 'order', [oSettings, aSort, sortedColumns] );
It isn't that the sorting isn't working, but rather it is being called twice which nullifies the desired result.
Agreed - it looks like an event listener is being doubled up. I'll post a fix shortly.
Thanks for letting me know about this.
Allan
Fix committed here. The nightly version will carry this change in the next 5 minutes or so.
Allan