diff --git a/addons/website/static/src/js/editor/snippets.options.js b/addons/website/static/src/js/editor/snippets.options.js index f566e4f6b9a..91a21435035 100644 --- a/addons/website/static/src/js/editor/snippets.options.js +++ b/addons/website/static/src/js/editor/snippets.options.js @@ -1574,7 +1574,7 @@ snippetOptions.registry.Parallax = snippetOptions.SnippetOptionWidget.extend({ // there may have been changes in the page that influenced the parallax // rendering (new snippets, ...). // TODO make this automatic. - if (this.parallaxEl) { + if (this.getParallaxEl()) { this._refreshPublicWidgets(); } }, @@ -1688,10 +1688,11 @@ snippetOptions.registry.Parallax = snippetOptions.SnippetOptionWidget.extend({ * @param {Event} ev */ _onExternalUpdate(ev) { - if (!this.parallaxEl) { + const parallaxEl = this.getParallaxEl(); + if (!parallaxEl) { return; } - const bgImage = this.parallaxEl.style.backgroundImage; + const bgImage = parallaxEl.style.backgroundImage; if (!bgImage || bgImage === 'none' || this.$target.hasClass('o_background_video')) { // The parallax option was enabled but the background image was // removed: disable the parallax option.