From b731ae7bb1066269bdbc5ec26e4209f9fbe01e98 Mon Sep 17 00:00:00 2001 From: Antoine Guenet Date: Mon, 10 Oct 2022 13:59:32 +0000 Subject: [PATCH] [FIX] mass_mailing: prevent dropping snippets outside mailing The fix at [1] had to be adapted anyway since the conversion to OWL. As a result it was possible to drop snippets below the mailing area. [1]: https://github.com/odoo/odoo/pull/77724/commits/65b67d66de72fab390b8887c12532b840d47c95f task-3002441 closes odoo/odoo#102972 X-original-commit: fe4006997daeb5d323b364821fc2815a45e78495 Signed-off-by: David Monjoie (dmo) --- addons/mass_mailing/static/src/js/mass_mailing_html_field.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mass_mailing/static/src/js/mass_mailing_html_field.js b/addons/mass_mailing/static/src/js/mass_mailing_html_field.js index 3979310bd62..9fb32133cb7 100644 --- a/addons/mass_mailing/static/src/js/mass_mailing_html_field.js +++ b/addons/mass_mailing/static/src/js/mass_mailing_html_field.js @@ -136,7 +136,7 @@ export class MassMailingHtmlField extends HtmlField { // named so they are handled properly by the snippets menu. this.wysiwyg.$iframeBody.find('.o_layout').addBack().data('name', 'Mailing'); // We don't want to drop snippets directly within the wysiwyg. - this.wysiwyg.$iframeBody.removeClass('o_editable'); + this.wysiwyg.$iframeBody.find('.odoo-editor-editable').removeClass('o_editable'); initializeDesignTabCss(this.wysiwyg.getEditable()); this.wysiwyg.getEditable().find('img').attr('loading', '');