diff --git a/addons/website/static/src/js/editor/snippets.options.js b/addons/website/static/src/js/editor/snippets.options.js index 44ef1b631b3..521365d3ba1 100644 --- a/addons/website/static/src/js/editor/snippets.options.js +++ b/addons/website/static/src/js/editor/snippets.options.js @@ -2749,8 +2749,7 @@ options.registry.anchor = options.Class.extend({ if (this.$target[0].id === anchorName) { // If the chosen anchor name is already the one used by the // element, close the dialog and do nothing else - this.close(); - return; + return true; } const alreadyExists = !!this.ownerDocument.getElementById(anchorName);