javascript - Handle Carriage Return from Barcode in Web Browser -
i writing web application needs take input barcode scanner.
currently, system printing barcode adding '\13' (i think carriage return) beginning of value. thus, whenever barcode scanned example firefox, cursor jumps search bar , puts value there rather in text field.
i cannot modify printed barcodes themselves. there way prevent barcode changing input field text box search bar?
thanks!
hitting enter not "jump" different input, instead submit formular in focus located. following keypresses go reloaded page, might end in autofocused search bar or so.
to prevent such, install keypress
listener on barcode input field , call .preventdefault()
on event when enter key. see prevent users submitting form hitting enter details.
Comments
Post a Comment