diff --git a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js index b5db66ca0b5..67313267d28 100644 --- a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js +++ b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js @@ -1108,13 +1108,17 @@ const Wysiwyg = Widget.extend({ this.odooEditor.historyResetLatestComputedSelection(true); } this._processAndApplyColor(eventName, ev.data.color); - this.odooEditor.historyStep(); }); colorpicker.on('color_hover color_leave', null, ev => { if (hadNonCollapsedSelection) { this.odooEditor.historyResetLatestComputedSelection(true); } - this._processAndApplyColor(eventName, ev.data.color); + this.odooEditor.historyPauseSteps(); + try { + this._processAndApplyColor(eventName, ev.data.color); + } finally { + this.odooEditor.historyUnpauseSteps(); + } }); colorpicker.on('enter_key_color_colorpicker', null, () => { $dropdown.children('.dropdown-toggle').dropdown('hide');