I'm trying to scan some barcode to textfield contained in my browser but it opens the downloads page in any browser (chrome, firefox, ie). I'm guessing that there is some input equivalent to CTRL + J that triggers the browser to open the download page.
Is anyone ran into this problem? Is there a way to pass it (assuming that I my clients can't change their scanner configuration neither the browser configuration)?
Thanks.
Although it is late to post an answer, I hope this helps someone in future.
The problem is due to the end character sent from the barcode reader. The default setting of my barcode reader is to send CR+LF
after input. This unfortunately opens downloads page in chrome. The fix for this is very simple, instead of configuring the scanner itself (which can be tricky), you can add the following script to your page to ignore the end character sent from barcode scanner:
<script>
document.addEventListener('keydown', function(event) {
if( event.keyCode == 13 || event.keyCode == 17 || event.keyCode == 74 )
event.preventDefault();
});
</script>
There was also an old bug opened for this with chrome, but this was closed/unresolved since this is not a bug but more of an input configuration issue.