diff --git a/addons/web_editor/static/src/js/editor/snippets.editor.js b/addons/web_editor/static/src/js/editor/snippets.editor.js index 0a8a53216e1..ea88eb34da0 100644 --- a/addons/web_editor/static/src/js/editor/snippets.editor.js +++ b/addons/web_editor/static/src/js/editor/snippets.editor.js @@ -1546,6 +1546,10 @@ var SnippetEditor = Widget.extend({ * @param {OdooEvent} ev */ _onSnippetOptionVisibilityUpdate: function (ev) { + if (this.options.wysiwyg.isSaving()) { + // Do not update the option visibilities if we are destroying them. + return; + } ev.data.show = this._toggleVisibilityStatus(ev.data.show); }, /** @@ -4051,6 +4055,10 @@ var SnippetsMenu = Widget.extend({ * @param {OdooEvent} ev */ _onSnippetOptionVisibilityUpdate: async function (ev) { + if (this.options.wysiwyg.isSaving()) { + // Do not update the option visibilities if we are destroying them. + return; + } if (!ev.data.show) { await this._activateSnippet(false); }