diff options
| author | wan <wan@odoo.com> | 2019-09-16 14:23:31 +0000 |
|---|---|---|
| committer | wan <wan@odoo.com> | 2019-09-17 10:13:55 +0000 |
| commit | ef46378cd38d6cb361f1b867a3009f3bbe3bd7c1 (patch) | |
| tree | 2c3ae853120d1913c1d4270242b41033c21dba11 /addons/web/static/src/js/core/dom.js | |
| parent | 7b0d0745dddcc0b1900b5731b7f6ac23573dfbce (diff) | |
[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>
Diffstat (limited to 'addons/web/static/src/js/core/dom.js')
| -rw-r--r-- | addons/web/static/src/js/core/dom.js | 7 |
1 files 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 |
