diff options
| author | Samuel Degueldre <sad@odoo.com> | 2020-04-07 10:06:14 +0000 |
|---|---|---|
| committer | Samuel Degueldre <sad@odoo.com> | 2020-04-23 13:11:06 +0000 |
| commit | 91c3b1c0d7363a1cbc8ca8e895e6fc008ca25e38 (patch) | |
| tree | c611614415ac1c279d6ed93d34dd878b6d4fd4dc /addons/website_mass_mailing/static/src/js/website_mass_mailing.js | |
| parent | 7be90d25e668b8620871b0d79e5b0ca1a5a671be (diff) | |
[FIX] website_mass_mailing: fix traceback when saving with popup open
When the newsletter popup was introduced, the modal was for some reason
marked with the o_editable class, which is normally used to let the
editor know which elements in the page can be edited and saved in the
database. Because of this, upon saving with the modal in the page (ie,
if the modal is open when saving) it would try to destroy the editor
associated with the modal, which doesn't exist, resulting in a
traceback.
This commit fixes that by removing the o_editable class from the modal,
this doesn't actually prevent edition, because the modal is already
inside of an editable segment of the page.
task-2092593
closes odoo/odoo#50080
X-original-commit: 856d21cef530a9393bcebbf314a9316934ffb7c7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/website_mass_mailing/static/src/js/website_mass_mailing.js')
| -rw-r--r-- | addons/website_mass_mailing/static/src/js/website_mass_mailing.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_mass_mailing/static/src/js/website_mass_mailing.js b/addons/website_mass_mailing/static/src/js/website_mass_mailing.js index 22a739a98e9..1ea942ddc76 100644 --- a/addons/website_mass_mailing/static/src/js/website_mass_mailing.js +++ b/addons/website_mass_mailing/static/src/js/website_mass_mailing.js @@ -167,7 +167,7 @@ publicWidget.registry.newsletter_popup = publicWidget.Widget.extend({ $content: $('<div/>').html(content), $parentNode: this.$target, backdrop: !this.editableMode, - dialogClass: 'p-0' + (this.editableMode ? ' o_editable oe_structure oe_empty' : ''), + dialogClass: 'p-0' + (this.editableMode ? ' oe_structure oe_empty' : ''), renderFooter: false, size: 'medium', }); |
