Question

We have an EVO Laser USB barcode scanner, and my web app (kind of?) breaks when we scan something. If we type the exact same thing in, there's no problem. In fact, the scan is successful, and types in the digits from the barcode, and brings it to the next page in the sequence. The difference is, the barcode scanner makes the browser console pop up with the following error:

browser console error

This happens consistently: typing works, but scanner pops up the error. I thought the computer couldn't tell...how on earth is this causing a Firefox-specific error? (FF28.0 clean stock install.)

Was it helpful?

Solution

As it happens, my app was a port of a desktop app built around an older scanner. That older scanner did not emit any special characters after scanning, so the desktop app would react automatically after an exact number of digits were typed/scanned. I made the webapp port work the same way. However, the new scanner being used emitted a CRLF just after scanning, which would cause FF to try to submit when it's already had some JavaScript call form.submit() in reaction to enough characters being typed. I don't think FF "should" react with the above error, but the solution was simple, to disable the feature of the barcode reader that makes it emit CR and LF after a successful scan. (Even on 1ms interchar delay, this works fine.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top