Skip to content

Commit 758347e

Browse files
committed
Update cart-builder.html
1 parent 3c89384 commit 758347e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

barcode-scanner-api-samples/scan-multiple-barcodes/cart-builder.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ <h2>Simulated Shopping Cart</h2>
246246
document.addEventListener("mouseup", () => (isDragging = false));
247247

248248
dragDiv.addEventListener("touchstart", (e) => {
249-
e.preventDefault();
250249
isDragging = true;
251250
offsetX = e.touches[0].clientX - dragDiv.offsetLeft;
252251
offsetY = e.touches[0].clientY - dragDiv.offsetTop;
@@ -258,7 +257,7 @@ <h2>Simulated Shopping Cart</h2>
258257
dragDiv.style.left = `${e.touches[0].clientX - offsetX}px`;
259258
dragDiv.style.top = `${e.touches[0].clientY - offsetY}px`;
260259
}
261-
});
260+
}, { passive: false });
262261

263262
document.addEventListener("touchend", () => (isDragging = false));
264263
};

0 commit comments

Comments
 (0)