summaryrefslogtreecommitdiff
path: root/addons/web_editor/static
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web_editor/static')
-rw-r--r--addons/web_editor/static/src/js/editor/snippets.options.js5
1 files changed, 4 insertions, 1 deletions
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 621cd9b4d6f..841383c589d 100644
--- a/addons/web_editor/static/src/js/editor/snippets.options.js
+++ b/addons/web_editor/static/src/js/editor/snippets.options.js
@@ -3528,7 +3528,10 @@ registry.BackgroundOptimize = ImageHandlerOption.extend({
*/
async _loadImageInfo() {
this.img = new Image();
- Object.entries(this.$target[0].dataset).forEach(([key, value]) => {
+ Object.entries(this.$target[0].dataset).filter(([key]) =>
+ // Avoid copying dynamic editor attributes
+ !['oeId','oeModel', 'oeField', 'oeXpath', 'noteId'].includes(key)
+ ).forEach(([key, value]) => {
this.img.dataset[key] = value;
});
const src = getBgImageURL(this.$target[0]);