summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2018-08-22 15:51:07 +0200
committerSébastien Theys <seb@odoo.com>2018-08-22 15:51:07 +0200
commite86d723c3f779a4678116d7fd2fa190d1db985ea (patch)
treeab9378774f83bf2846dbc181c3a42c374c8dd7e6 /addons
parent1f35fc26becd317def83a473458388a9e6acb86a (diff)
[FIX] web: prevent textarea scrollbar on Firefox
The following line is necessary to prevent the scrollbar to appear on the textarea on Firefox when adding a new line if the current line has just enough characters to completely fill the line. This fix should be fine since we compute the height depending on the content, there should never be an overflow. TODO ideally understand why and fix this another way if possible. Task: none PR: none
Diffstat (limited to 'addons')
-rw-r--r--addons/web/static/src/js/core/dom.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/web/static/src/js/core/dom.js b/addons/web/static/src/js/core/dom.js
index 060bb141eff..115cc5fcf0c 100644
--- a/addons/web/static/src/js/core/dom.js
+++ b/addons/web/static/src/js/core/dom.js
@@ -115,6 +115,14 @@ return {
}).css(direction, -10000);
$fixedTextarea.data("auto_resize", true);
+ // The following line is necessary to prevent the scrollbar to appear
+ // on the textarea on Firefox when adding a new line if the current line
+ // has just enough characters to completely fill the line.
+ // This fix should be fine since we compute the height depending on the
+ // content, there should never be an overflow.
+ // TODO ideally understand why and fix this another way if possible.
+ $textarea.css({'overflow-y': 'hidden'});
+
resize();
removeVerticalResize();
$textarea.data("auto_resize", true);