0

I have a PWA app using the Quagga Barcode library. It works fine on desktop but in mobile mode on apple iphone12 once it detects a barcode the OnDetected keeps firing over and over. On the OnDetected routine i simply put a alert to display code scanned.

vimuth
  • 5,064
  • 33
  • 79
  • 116
  • The code for OnDetected im using is Quagga.onDetected(function (result) { var code = result.codeResult.code; alert("Code is = " + code); }); – Shawrie Jul 11 '22 at 22:15
  • have you always had the `alert` in onDetected? `alert` isn't the best way to debug javascript as it blocks execution so things can behave differently with/without it – Jaromanda X Jul 12 '22 at 00:12
  • Hi i changed it to the below and got the screen quickly filling with the words found code after one scan. var code = result.codeResult.code; var list = document.getElementById("ProdList"); if (result.codeResult.code) { //alert("found code"); list.innerText = list.innerText + "Found code"; } – Shawrie Jul 12 '22 at 16:05

0 Answers0