diff options
| author | Adrien Dieudonne <adr@odoo.com> | 2018-04-30 11:25:55 +0200 |
|---|---|---|
| committer | Adrien Dieudonne <adr@odoo.com> | 2018-04-30 16:14:38 +0200 |
| commit | 9e14d93c05895fa501d9eee9d75a87f17d6f5f89 (patch) | |
| tree | 29367fe35aa9ce9723628ffd19c7fbe75dec6b73 /addons/barcodes/static | |
| parent | 29c29b4578d36c22b7b44b51d1d2c631be45722a (diff) | |
[FIX] barcodes: keep vertical position while scanning
Before this commit, you were automatically redirected to the top of
the page when you scanned a product.
It was, therefore, difficult to find the product that had just been
scanned and to check its quantity.
Because of @3a74afd21 we need to put the focus in an invisible input
at the top of the page.
This input is now always vertically centered in the middle of the page.
Diffstat (limited to 'addons/barcodes/static')
| -rw-r--r-- | addons/barcodes/static/src/js/barcode_events.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/barcodes/static/src/js/barcode_events.js b/addons/barcodes/static/src/js/barcode_events.js index 71e07030ffd..88ed3ce814c 100644 --- a/addons/barcodes/static/src/js/barcode_events.js +++ b/addons/barcodes/static/src/js/barcode_events.js @@ -61,7 +61,9 @@ var BarcodeEvents = core.Class.extend(mixins.PropertiesMixin, { name: 'barcode', type: 'text', css: { - 'position': 'absolute', + 'position': 'fixed', + 'top': '50%', + 'transform': 'translateY(-50%)', 'opacity': 0, }, }); |
