[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) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
This commit is contained in:
Antoine Guenet
2022-02-08 14:53:59 +00:00
parent b4f2c40815
commit 23278b7b5a
@@ -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.