From 23278b7b5a7eecfa59e656046709b0dad465aa4c Mon Sep 17 00:00:00 2001 From: Antoine Guenet Date: Tue, 8 Feb 2022 09:16:35 +0000 Subject: [PATCH] [FIX] web_editor: prevent height 0 on mailing When saving a mailing (mass_mailing) with invalid fields, the mailing ended up having a height of 0. This is because some changes from convert_inline are applied inline and may be incompatible with the grid structure of the mailing. This was the case with height=0 applied on the mail layout element as a result of it having a child with a height expressed in percents. Rather than set the height to 0, we now set it to whatever the height was measured to be. task-2734605 closes odoo/odoo#84174 X-original-commit: 5c606188d1a57a0702213298f5ffa3ace8fd5523 Signed-off-by: David Monjoie (dmo) Signed-off-by: Antoine Guenet --- addons/web_editor/static/src/js/backend/convert_inline.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_editor/static/src/js/backend/convert_inline.js b/addons/web_editor/static/src/js/backend/convert_inline.js index 6ce7e909c15..5db9c3e9ed1 100644 --- a/addons/web_editor/static/src/js/backend/convert_inline.js +++ b/addons/web_editor/static/src/js/backend/convert_inline.js @@ -544,7 +544,7 @@ function formatTables($editable) { height = parent.style.getPropertyValue('height'); } if (parent) { - parent.style.setProperty('height', '0'); + parent.style.setProperty('height', $(parent).height()); } } // Align self and justify content don't work on table cells.