From d534cc71c2d9d931e514a86fd9cea5f2133dc3cb Mon Sep 17 00:00:00 2001 From: jpr-odoo Date: Fri, 27 Sep 2019 06:12:26 +0000 Subject: [PATCH] [FIX] website_mass_mailing: fixed the traceback on close modal dialog The issue here is, the modal for the newsletter is part of the editable area, and when we click on the 'close' button of that modal, it is destroyed but the 'summer note' tries to bind the events related to the button(because close is a button). fixed the traceback, to disable invoking 'summer note' events on click of the 'close' button on modal task-2075232 X-original-commit: 110ea837903f3e6c67c1d0e0081073edea8852d1 --- .../website_mass_mailing/static/src/js/website_mass_mailing.js | 3 +++ 1 file changed, 3 insertions(+) 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 535e79576b5..dfa8a8fc767 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 @@ -168,6 +168,9 @@ publicWidget.registry.newsletter_popup = publicWidget.Widget.extend({ }); this.massMailingPopup.opened().then(function () { var $modal = self.massMailingPopup.$modal; + $modal.find('header button.close').on('mouseup', function (ev) { + ev.stopPropagation(); + }); $modal.addClass('o_newsletter_modal'); $modal.find('.oe_structure').attr('data-editor-message', _t('DRAG BUILDING BLOCKS HERE')); $modal.find('.modal-dialog').addClass('modal-dialog-centered');