[FIX] web_editor: prevent traceback on reposition background image

closes odoo/odoo#63413

X-original-commit: 9cd778e683a5978c920bb0d367b3eb01ddf21c6f
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
Antoine Guenet
2020-12-15 17:14:33 +00:00
parent c9d9b4cc2c
commit 61b0ac731b
@@ -4329,7 +4329,7 @@ registry.BackgroundPosition = SnippetOptionWidget.extend({
this.$overlayBackground = this.$overlayContent.find('.o_overlay_background');
this.$backgroundOverlay.on('click', '.o_btn_apply', async () => {
await this.wysiwyg.withDomMutations(() => {
await this.wysiwyg.withDomMutations(this.$target, () => {
this.$target.css('background-position', this.$bgDragger.css('background-position'));
});
this._toggleBgOverlay(false);