Assuming you're talking about an actual barcode scanner device: barcode scanners commonly present as USB keyboards to the OS. The thing about USB keyboards is that events aren't pushed to the computer but are polled at a set rate (commonly 125Hz). It could be that the scanner produces the numbers quick enough to approach the USB polling rate, and maybe Chrome has some additional smarts to handle it, or maybe Firefox just adds a bit of overhead that's enough to lose some of the characters. You could try increasing the computer's polling rate and see if that helps.