[FIX] barcodes: skip undefined keys in barcode value

This fixes an issue occurring with Firefox.
Some events was buffered with an undefined value and it wasn't
possible to build the barcode value from these events.
See 'handle_buffered_keys' function.

So now, we simply skip this kind of event.
We consider this as 'special keys'.
This commit is contained in:
Adrien Dieudonne
2018-03-20 16:21:12 +01:00
parent cbd395ec36
commit 5bc29744c9
@@ -109,7 +109,7 @@ var BarcodeEvents = core.Class.extend(mixins.PropertiesMixin, {
e.key === "ArrowUp" || e.key === "ArrowDown" ||
e.key === "Escape" || e.key === "Tab" ||
e.key === "Backspace" || e.key === "Delete" ||
/F\d\d?/.test(e.key)) {
e.key === "Unidentified" || /F\d\d?/.test(e.key)) {
return true;
} else {
return false;