From ef46378cd38d6cb361f1b867a3009f3bbe3bd7c1 Mon Sep 17 00:00:00 2001 From: wan Date: Mon, 16 Sep 2019 14:23:31 +0000 Subject: [PATCH] [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). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- addons/web/static/src/js/core/dom.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/addons/web/static/src/js/core/dom.js b/addons/web/static/src/js/core/dom.js index 7be17700f98..f260478da1e 100644 --- a/addons/web/static/src/js/core/dom.js +++ b/addons/web/static/src/js/core/dom.js @@ -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