Skip to content

Commit 54bee91

Browse files
Fixed dragging scrolls the page beyond the boundary
This fixes drag-drop-touch-js#92
1 parent 07edc6d commit 54bee91

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ts/drag-drop-touch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,9 +543,9 @@ class DragDropTouch {
543543
_moveImage(e: TouchEvent) {
544544
requestAnimationFrame(() => {
545545
if (this._img) {
546-
let pt = pointFrom(e, true),
546+
let pt = pointFrom(e, false),
547547
s = this._img.style;
548-
s.position = `absolute`;
548+
s.position = `fixed`;
549549
s.pointerEvents = `none`;
550550
s.zIndex = `999999`;
551551
s.left = `${round(pt.x - this._imgOffset.x)}px`;

0 commit comments

Comments
 (0)