From 8ba517bfa8cce4e3f6f72ea68b24e23cdc5eb095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Theys?= Date: Mon, 27 Aug 2018 13:59:43 +0200 Subject: [PATCH] [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 --- addons/web/static/src/js/views/list/list_editable_renderer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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}); }); }