diff --git a/addons/website/static/src/components/wysiwyg_adapter/wysiwyg_adapter.js b/addons/website/static/src/components/wysiwyg_adapter/wysiwyg_adapter.js index c5f81257252..ae22271b415 100644 --- a/addons/website/static/src/components/wysiwyg_adapter/wysiwyg_adapter.js +++ b/addons/website/static/src/components/wysiwyg_adapter/wysiwyg_adapter.js @@ -398,11 +398,17 @@ export class WysiwygAdapterComponent extends Wysiwyg { // generated a new stack and break the "redo" of the editor. this.odooEditor.automaticStepSkipStack(); for (const record of records) { - const $savable = $(record.target).closest(this.savableSelector); - if (record.attributeName === 'contenteditable') { continue; } + + const $savable = $(record.target).closest(this.savableSelector); + if (!$savable.length) { + continue; + } + + // Mark any savable element dirty if any tracked mutation occurs + // inside of it. $savable.not('.o_dirty').each(function () { if (!this.hasAttribute('data-oe-readonly')) { this.classList.add('o_dirty');