Skip to content

Commit

Permalink
Merge pull request #415 from mtraynham/ref_409
Browse files Browse the repository at this point in the history
Ref #409 - Fix DOM traversal for handle parent node.
  • Loading branch information
danomatic authored Jun 24, 2016
2 parents 7a84a3d + bb7bf00 commit 569a9a0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/angular-gridster.js
Original file line number Diff line number Diff line change
Expand Up @@ -1376,15 +1376,17 @@
match = true;
break;
}
var target = e.target;
for (var p = 0; p < 20; ++p) {
var parent = e.target.parentNode;
var parent = target.parentNode;
if (parent === $el[0]) {
break;
}
if (parent === handle) {
match = true;
break outerloop;
}
target = parent;
}
}
if (!match) {
Expand Down Expand Up @@ -1425,7 +1427,7 @@

var maxLeft = gridster.curWidth - 1;
var maxTop = gridster.curRowHeight * gridster.maxRows - 1;

// Get the current mouse position.
mouseX = e.pageX;
mouseY = e.pageY;
Expand Down

0 comments on commit 569a9a0

Please sign in to comment.