We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6b07801 commit ed06fccCopy full SHA for ed06fcc
1 file changed
barcode-scanner-api-samples/scan-multiple-barcodes/cart-builder.html
@@ -246,7 +246,6 @@ <h2>Simulated Shopping Cart</h2>
246
document.addEventListener("mouseup", () => (isDragging = false));
247
248
dragDiv.addEventListener("touchstart", (e) => {
249
- e.preventDefault();
250
isDragging = true;
251
offsetX = e.touches[0].clientX - dragDiv.offsetLeft;
252
offsetY = e.touches[0].clientY - dragDiv.offsetTop;
@@ -258,7 +257,7 @@ <h2>Simulated Shopping Cart</h2>
258
257
dragDiv.style.left = `${e.touches[0].clientX - offsetX}px`;
259
dragDiv.style.top = `${e.touches[0].clientY - offsetY}px`;
260
}
261
- });
+ }, { passive: false });
262
263
document.addEventListener("touchend", () => (isDragging = false));
264
};
0 commit comments