File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
barcode-scanner-api-samples/scan-multiple-barcodes Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff 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 } ;
You can’t perform that action at this time.
0 commit comments