[FIX] barcodes: Allows 'tab' as end character

Before this commit 'tab' was escaped because isSpecialKey was true.
This was strange because this key was defined in 'endRegexp'.

So, there were only 'enter' key who worked as a barcode end key.
Note that it wasn't a big deal if 'tab' was used because checkBarcode
was executed anyway after a timeout.

Now the barcode value is directly checked if the strind ends with
'enter' or 'tab' (by-passing this timeout).

Part-of: odoo/odoo#93387
This commit is contained in:
Adrien Dieudonné
2022-07-04 14:07:27 +02:00
parent d621d15d22
commit f7ff35dad0
@@ -9,7 +9,7 @@ const { EventBus, whenReady } = owl;
function isSpecialKey(key) {
return (key === "ArrowLeft" || key === "ArrowRight" ||
key === "ArrowUp" || key === "ArrowDown" ||
key === "Escape" || key === "Tab" ||
key === "Escape" ||
key === "Backspace" || key === "Delete" ||
key === "Home" || key === "End" ||
key === "PageUp" || key === "PageDown" ||