From 8ff138a0daf6fcec4a122ec4e98ce3e5000611ed Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Tue, 7 Aug 2018 15:00:27 +0200 Subject: [PATCH] [FIX] barcodes: ok PageUp/Down/Home/End in firefox Same reason as 8d948d92. In firefox if barcode is installed, for example on a form view the keys to navigate the possible scrolling PageUp/PageDown/Home/End don't work at all. This is caused by the interface barcode catching and differences of the key event handling between firefox and other browser. So in this change, we add these keys so they are not catched by barcode. note: aso backport 5bc29744c so the code is the same between 10 and 11. related to opw-706352 closes #26219 --- addons/barcodes/static/src/js/barcode_events.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/barcodes/static/src/js/barcode_events.js b/addons/barcodes/static/src/js/barcode_events.js index bff05aa4636..287989d0efa 100644 --- a/addons/barcodes/static/src/js/barcode_events.js +++ b/addons/barcodes/static/src/js/barcode_events.js @@ -115,7 +115,9 @@ 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 === "Home" || e.key === "End" || + e.key === "PageUp" || e.key === "PageDown" || + e.key === "Unidentified" || /F\d\d?/.test(e.key)) { return true; } else { return false;