Skip to content

Commit

Permalink
Fixed scroll/drag issue in chrome, bumped version
Browse files Browse the repository at this point in the history
  • Loading branch information
Darnell Andries committed Feb 19, 2017
1 parent 732fdce commit 34dcab6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "drag-timetable",
"version": "1.0.9",
"version": "1.0.10",
"description": "Simple, customizable draggable timetable.",
"main": "dist/app.js",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/drag.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ class TimetableDraggable {
this.currentGhostElement.style.left = (ev.pageX - this.startOffsetX) + "px";
this.currentGhostElement.style.top = (ev.pageY - this.startOffsetY) + "px";
}
this.dragManager.spacer.moveUpdate(ev.pageY - this.startOffsetY - document.documentElement.scrollTop, this.taskId);
const scrollOffset = window.pageYOffset || document.documentElement.scrollTop;
this.dragManager.spacer.moveUpdate(ev.pageY - this.startOffsetY - scrollOffset, this.taskId);
}
}
}
Expand Down

0 comments on commit 34dcab6

Please sign in to comment.