From 6a9f78387221fb9bcc7b3eb537860263e755f29e Mon Sep 17 00:00:00 2001 From: Antoine Guenet Date: Tue, 29 Nov 2022 15:02:23 +0000 Subject: [PATCH] [FIX] web_editor: do not open text toolbar on change icon color If you clicked on a pictogram, then changed its color with the text colorpicker in the toolbar, the toolbar was replaced with the regular text toolbar, even though what was being edited was the pictogram. That's because the information of the last media clicked was lost in the process. task-3045166 X-original-commit: fa1c7e68eaa544445621ca7e7e2c647ffe857447 Part-of: odoo/odoo#107041 --- addons/web_editor/static/src/js/wysiwyg/wysiwyg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js index e72b34e330b..8f0684b561f 100644 --- a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js +++ b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js @@ -1656,7 +1656,7 @@ const Wysiwyg = Widget.extend({ if (this.odooEditor.deselectTable() && hasValidSelection(this.odooEditor.editable)) { this.odooEditor.document.getSelection().collapseToStart(); } - this._updateEditorUI(); + this._updateEditorUI(this.lastMediaClicked && { target: this.lastMediaClicked }); colorpicker.off('color_leave'); }); colorpicker.on('color_hover', null, ev => {