diff --git a/addons/website/static/src/snippets/s_popup/000.js b/addons/website/static/src/snippets/s_popup/000.js index d6f559fb331..00dd7ad9124 100644 --- a/addons/website/static/src/snippets/s_popup/000.js +++ b/addons/website/static/src/snippets/s_popup/000.js @@ -31,10 +31,12 @@ const SharedPopupWidget = publicWidget.Widget.extend({ destroy() { this._super(...arguments); - // Popup are always closed when entering/leaving edit mode (see - // PopupWidget), this allows to make sure the class is sync on the - // .s_popup parent after that moment too. - this.el.classList.add('d-none'); + // Popup are always closed when entering edit mode (see PopupWidget), + // this allows to make sure the class is sync on the .s_popup parent + // after that moment too. + if (!this.editableMode) { + this.el.classList.add('d-none'); + } }, //-------------------------------------------------------------------------- diff --git a/addons/website/static/src/snippets/s_popup/options.js b/addons/website/static/src/snippets/s_popup/options.js index e73ab7d3e82..867de61bedc 100644 --- a/addons/website/static/src/snippets/s_popup/options.js +++ b/addons/website/static/src/snippets/s_popup/options.js @@ -83,6 +83,9 @@ options.registry.SnippetPopup = options.Class.extend({ clearTimeout(timeoutID); resolve(); }); + // The following line is in charge of hiding .s_popup at the same + // time the modal is closed when the page is saved in edit mode. + this.$target[0].closest('.s_popup').classList.add('d-none'); this.$bsTarget.modal('hide'); }); },