summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2018-08-27 13:59:43 +0200
committerSébastien Theys <seb@odoo.com>2018-08-27 16:51:21 +0200
commit8ba517bfa8cce4e3f6f72ea68b24e23cdc5eb095 (patch)
treeef58f77074dc80c2142b8bb0201eb5e6b8b49c76 /addons
parent40430699dfbba715b143c109ebae415074da9f40 (diff)
[FIX] web: correctly set the width of the handle column on Firefox
Before this commit, the handle field column would become 1px too big on Firefox when editing the line because of a rounding issue. Task: none PR: none
Diffstat (limited to 'addons')
-rw-r--r--addons/web/static/src/js/views/list/list_editable_renderer.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/list/list_editable_renderer.js b/addons/web/static/src/js/views/list/list_editable_renderer.js
index 37dd33cd2ef..3a324e5bf5f 100644
--- a/addons/web/static/src/js/views/list/list_editable_renderer.js
+++ b/addons/web/static/src/js/views/list/list_editable_renderer.js
@@ -335,10 +335,12 @@ ListRenderer.include({
// When switching to edit mode, force the dimensions of all cells to
// their current value so that they won't change if their content
// changes, to prevent the view from flickering.
+ // We need to use getBoundingClientRect instead of outerWidth to
+ // prevent a rounding issue on Firefox.
if (editMode) {
$tds.each(function () {
var $td = $(this);
- $td.css({width: $td.outerWidth()});
+ $td.css({width: $td[0].getBoundingClientRect().width});
});
}