diff --git a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js index ef28be79a70..6b80d9b06e4 100644 --- a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js +++ b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js @@ -190,7 +190,8 @@ export class Wysiwyg extends Component { selectedTab: 'theme-colors', withGradients: true, onColorLeave: () => { - this.odooEditor.historyRevertCurrentStep(); + // We need to prevent rollback in case the seclection is in unremovable + this.odooEditor.withoutRollback(() => this.odooEditor.historyRevertCurrentStep()); // Compute the selection to ensure it's preserved between // selectionchange events in case this gets triggered multiple // times quickly.