diff options
| author | Christophe Simonis <chs@odoo.com> | 2016-07-14 17:17:39 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2016-07-14 17:17:54 +0200 |
| commit | 156dee2aec409894d3f638d6b9218bd0a90bd6c7 (patch) | |
| tree | a83af80a57418ef666c0229aa26de4346cac0c58 /addons/barcodes/static/src | |
| parent | e71d136d6ff0fae13d558457ed9334e98e2ab786 (diff) | |
| parent | fd9eb2e4819031c6758c021f4c335b591367632d (diff) | |
[MERGE] forward port branch 9.0 up to fd9eb2e
Diffstat (limited to 'addons/barcodes/static/src')
| -rw-r--r-- | addons/barcodes/static/src/js/barcode_events.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/barcodes/static/src/js/barcode_events.js b/addons/barcodes/static/src/js/barcode_events.js index 546faee3655..fca30916106 100644 --- a/addons/barcodes/static/src/js/barcode_events.js +++ b/addons/barcodes/static/src/js/barcode_events.js @@ -129,6 +129,10 @@ var BarcodeEvents = core.Class.extend(mixins.PropertiesMixin, { // Don't catch keypresses which could have a UX purpose (like shortcuts) if (e.ctrlKey || e.metaKey || e.altKey) return; + // Don't catch Return when nothing is buffered. This way users + // can still use Return to 'click' on focused buttons or links. + if (e.which === 13 && this.buffered_key_events.length === 0) + return; // Don't catch events targeting elements that are editable because we // have no way of redispatching 'genuine' key events. Resent events // don't trigger native event handlers of elements. So this means that |
