From f7ff35dad06ba0bfabf752797816d159a0ed133c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Dieudonn=C3=A9?= Date: Mon, 27 Jun 2022 07:52:22 +0000 Subject: [PATCH] [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 --- addons/barcodes/static/src/barcode_service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/barcodes/static/src/barcode_service.js b/addons/barcodes/static/src/barcode_service.js index d3aec1c096c..821a33e590c 100644 --- a/addons/barcodes/static/src/barcode_service.js +++ b/addons/barcodes/static/src/barcode_service.js @@ -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" ||