From 350e719504f3eb003e5fbaa367e61c7e1407fcd4 Mon Sep 17 00:00:00 2001 From: "Morgane (morm)" Date: Wed, 1 Feb 2023 13:33:09 +0000 Subject: [PATCH] [FIX] mass_mailing: fix dropdown and display issues This commit fixes the issues in the mass_mailing module where the display needs to be grid, and the dropdown dynamic is causing issues because of the css rules transform and unset. Popper.js manipulates transform and the position of the dropdown, and in mass_mailing, its calculations are wrong. These !important rules stops it from doing so, by unsetting the automatic rules generated by Popper. Part-of: odoo/odoo#110161 --- .../static/src/scss/mass_mailing.ui.scss | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/addons/mass_mailing/static/src/scss/mass_mailing.ui.scss b/addons/mass_mailing/static/src/scss/mass_mailing.ui.scss index cc2ae43b7e9..066439d3ba9 100644 --- a/addons/mass_mailing/static/src/scss/mass_mailing.ui.scss +++ b/addons/mass_mailing/static/src/scss/mass_mailing.ui.scss @@ -344,19 +344,27 @@ body.editor_enable.o_basic_theme.o_in_iframe { display: block; } } -} + #oe_snippets.o_loaded { + transform: translateX(0); -.o_mass_mailing_iframe #oe_snippets.o_loaded { - transition: none; - transform: translateX(0); + > .o_we_customize_panel .oe-toolbar { + #style.dropup, #font-size.dropup { + > .dropdown-menu { + overflow-y: scroll; + max-height: 200px; + } + } - > .o_we_customize_panel .oe-toolbar { - #style.dropup, #font-size.dropup { - > .dropdown-menu { - overflow-y: scroll; - max-height: 200px; + // Popper.js manipulates transform and position of the dropdown. In + // mass_mailing, its calculations are wrong. These !important rules + // removes the wrong values automatically generated by Popper. + #justify , #style.dropup, #font-size.dropup { + > .dropdown-menu { + transform: unset !important; + bottom: 100% !important; + top: unset !important; + } } } } } -