diff --git a/lib/folk-commitment-pool.ts b/lib/folk-commitment-pool.ts index b4499cb..915eedc 100644 --- a/lib/folk-commitment-pool.ts +++ b/lib/folk-commitment-pool.ts @@ -271,6 +271,7 @@ export class FolkCommitmentPool extends FolkShape { if (container) container.replaceWith(this.#wrapper); this.#canvas = this.#wrapper.querySelector("canvas")!; + this.#canvas.style.touchAction = "none"; // prevent browser scroll/pan on touch drag this.#ctx = this.#canvas.getContext("2d")!; this.#canvas.addEventListener("pointermove", this.#onPointerMove); @@ -354,8 +355,9 @@ export class FolkCommitmentPool extends FolkShape { const orb = this.#findOrbAt(x, y); if (!orb) return; - // Prevent FolkShape from starting a shape-move + // Prevent FolkShape from starting a shape-move + browser scroll/pan on touch e.stopPropagation(); + e.preventDefault(); this.#draggingOrb = orb; this.#ripples.push(new Ripple(orb.x, orb.y, orb.color));