From 54bee91dd0f126ef4469d99fdfb21d22b27ab244 Mon Sep 17 00:00:00 2001 From: Marius Gundersen Date: Mon, 13 Jan 2025 10:25:49 +0100 Subject: [PATCH] Fixed dragging scrolls the page beyond the boundary This fixes #92 --- ts/drag-drop-touch.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/drag-drop-touch.ts b/ts/drag-drop-touch.ts index b7e7a15..0938ba3 100644 --- a/ts/drag-drop-touch.ts +++ b/ts/drag-drop-touch.ts @@ -543,9 +543,9 @@ class DragDropTouch { _moveImage(e: TouchEvent) { requestAnimationFrame(() => { if (this._img) { - let pt = pointFrom(e, true), + let pt = pointFrom(e, false), s = this._img.style; - s.position = `absolute`; + s.position = `fixed`; s.pointerEvents = `none`; s.zIndex = `999999`; s.left = `${round(pt.x - this._imgOffset.x)}px`;