summaryrefslogtreecommitdiff
path: root/addons/website/static/src/snippets/s_popup/options.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/website/static/src/snippets/s_popup/options.js')
-rw-r--r--addons/website/static/src/snippets/s_popup/options.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/website/static/src/snippets/s_popup/options.js b/addons/website/static/src/snippets/s_popup/options.js
index 4c43041c614..842cc284c83 100644
--- a/addons/website/static/src/snippets/s_popup/options.js
+++ b/addons/website/static/src/snippets/s_popup/options.js
@@ -8,7 +8,10 @@ options.registry.SnippetPopup = options.Class.extend({
* @override
*/
start: function () {
- this.$target.find('.s_popup_close').on('click', () => {
+ // Note: the link are excluded here so that internal modal buttons do
+ // not close the popup as we want to allow edition of those buttons.
+ this.$target.find('.js_close_popup:not(a, .btn)').on('click', ev => {
+ ev.stopPropagation();
this.onTargetHide();
this.trigger_up('snippet_option_visibility_update', {show: false});
});