[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.
This commit is contained in:
Adrien Dieudonne
2018-04-30 16:14:38 +02:00
parent 29c29b4578
commit 9e14d93c05
@@ -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,
},
});