VisionSmarts / pic2shop-pro-barcode-database

PHP database demo that integrates with the "pic2shop pro" barcode scanner app for iOS and Android
8 stars 5 forks source link

javascript callback issue #2

Closed crawler closed 1 year ago

crawler commented 10 years ago

JS alert control is ignoring touches when it showed from callback. Tested on iOS 7 Prove: http://jsbin.com/jefahireyowu/1/

    function scanBarcode(code) {
        alert(code);
    }
<a href="p2spro://scan?callback=javascript:scanBarcode('CODE')&formats=QR">SCAN</a>

And this can be solved by adding timeout:

    function scanBarcode(code) {
      setTimeout(function() {
        alert(code);
      }, 1);
    }
VisionSmarts commented 10 years ago

Thank you! This will be fixed in the upcoming update.