arteyazilim / rowsorter

Drag & drop table row sorter pluging with touch support for Vanilla JS and jQuery.
http://borayazilim.github.io/rowsorter
MIT License
74 stars 23 forks source link

TypeError when dragging handler beyond the screen edge #16

Open allanrehhoff opened 7 years ago

allanrehhoff commented 7 years ago

This might be a minor issue, but wanting to bring this console warning to the attention of the developer for sake of removing any potential bugs it might cause in the future.

RowSorter.min.js:731 Uncaught TypeError: Cannot read property 'tagName' of null at closest (RowSorter.min.js:731) at RowSorter._move (RowSorter.min.js:267) at RowSorter.touchmove (RowSorter.min.js:247) closest @ RowSorter.min.js:731 RowSorter._move @ RowSorter.min.js:267 touchmove @ RowSorter.min.js:247

Steps to reproduce:

  1. Create a sortable table, with drag handler attached to td.
  2. Drag a table row up/down and move touch pointer beyond the screen edge.

Eventuelly see this video: http://recordit.co/uoK2hL7JnY

So far in my testing this appears to have no negative effects, in relation to callbacks being fired. both "onDragStart" and "onDrop" fires successfully.

Windows 10 with chrome 58.0.3029.110 (64-bit)