[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
This commit is contained in:
Antoine Guenet
2022-12-02 10:11:15 +01:00
parent 42e0c4fd4b
commit 6a9f783872
@@ -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 => {