Skip to content

Commit

Permalink
Merge pull request #1 from kkozlik/kkozlik-patch-1
Browse files Browse the repository at this point in the history
Allow to drag rows even when user click to not "TD" node
  • Loading branch information
kkozlik authored Feb 8, 2019
2 parents d7c61c7 + 99d8dd8 commit 4236cac
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions js/jquery.tablednd.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,8 @@ jQuery.tableDnD = {
// Iterate through each row, the row is bound to "this"
if (! $(this).hasClass("nodrag")) {
$(this).bind(startEvent, function(e) {
if (e.target.tagName === "TD") {
$.tableDnD.initialiseDrag(this, table, this, e, config);
return false;
}
$.tableDnD.initialiseDrag(this, table, this, e, config);
return false;
}).css("cursor", "move"); // Store the tableDnD object
} else {
$(this).css("cursor", ""); // Remove the cursor if we don't have the nodrag class
Expand Down

0 comments on commit 4236cac

Please sign in to comment.