[FIX] web: remove absolute position on autoresize

Before this commit, it was set to position absolute, in order to make
sure it is not visible. But it is not really necessary. Also, it was
harmful in some situations, for example the web_ribbon is missplaced
in edit mode (apparently in webkit based browsers).

The issue was detected on the invoice form, when it is paid and we are
going in edit mode.

A fix is to set the height of the dummy text area to 0 instead of
putting its position to absolute and out of the screen.

closes odoo/odoo#36965

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
This commit is contained in:
wan
2019-09-17 10:13:55 +00:00
parent 7b0d0745dd
commit ef46378cd3
+2 -5
View File
@@ -108,16 +108,13 @@ var dom = {
class: $textarea[0].className,
});
var direction = _t.database.parameters.direction === 'rtl' ? 'right' : 'left';
$fixedTextarea.css({
position: 'absolute',
opacity: 0,
height: 10,
height: 0,
borderTopWidth: 0,
borderBottomWidth: 0,
padding: 0,
top: -10000,
}).css(direction, -10000);
});
$fixedTextarea.data("auto_resize", true);
// The following line is necessary to prevent the scrollbar to appear