diff --git a/addons/web_editor/static/src/js/editor/snippets.options.js b/addons/web_editor/static/src/js/editor/snippets.options.js index cd99c0c8a43..6d1c08c2a65 100644 --- a/addons/web_editor/static/src/js/editor/snippets.options.js +++ b/addons/web_editor/static/src/js/editor/snippets.options.js @@ -1676,9 +1676,9 @@ const SnippetOptionWidget = Widget.extend({ * @param {*} data * @returns {Promise} */ - notify: async function (name, data) { + notify: function (name, data) { if (name === 'target') { - await this.setTarget(data); + this.setTarget(data); } }, /** @@ -1687,12 +1687,13 @@ const SnippetOptionWidget = Widget.extend({ * per-slide options to be in the main menu of the whole snippet. This * function allows to set the option's target. * + * Note: the UI is not updated accordindly automatically. + * * @param {jQuery} $target - the new target element * @returns {Promise} */ - setTarget: async function ($target) { + setTarget: function ($target) { this.$target = $target; - await this.updateUI(); }, /** * Updates the UI. For widget update, @see _computeWidgetState. @@ -2290,8 +2291,8 @@ registry.sizing = SnippetOptionWidget.extend({ /** * @override */ - setTarget: async function () { - await this._super(...arguments); + setTarget: function () { + this._super(...arguments); this._onResize(); }, /** @@ -2471,8 +2472,8 @@ registry.background = SnippetOptionWidget.extend({ /** * @override */ - setTarget: async function () { - await this._super(...arguments); + setTarget: function () { + this._super(...arguments); // TODO should be automatic for all options as equal to the start method this.bindBackgroundEvents(); this.__customImageSrc = this._getSrcFromCssValue(); diff --git a/addons/website/static/src/snippets/s_image_gallery/options.js b/addons/website/static/src/snippets/s_image_gallery/options.js index 819ac1aedc0..1bc0a042b3d 100644 --- a/addons/website/static/src/snippets/s_image_gallery/options.js +++ b/addons/website/static/src/snippets/s_image_gallery/options.js @@ -294,8 +294,8 @@ options.registry.gallery = options.Class.extend({ * * @override */ - notify: async function (name, data) { - await this._super(...arguments); + notify: function (name, data) { + this._super(...arguments); if (name === 'image_removed') { data.$image.remove(); // Force the removal of the image before reset this.mode('reset', this.getMode()); diff --git a/addons/website_form/static/src/snippets/s_website_form/options.js b/addons/website_form/static/src/snippets/s_website_form/options.js index 9a69b3efcda..2e9e48930d2 100644 --- a/addons/website_form/static/src/snippets/s_website_form/options.js +++ b/addons/website_form/static/src/snippets/s_website_form/options.js @@ -403,8 +403,8 @@ options.registry.WebsiteFormEditor = FormEditor.extend({ /** * @override */ - notify: async function (name, data) { - await this._super(...arguments); + notify: function (name, data) { + this._super(...arguments); if (name === 'field_mark') { this._setLabelsMark(); } else if (name === 'add_field') {