[FIX] web_editor: display current text color in text color button

The editor toolbar button to trigger the colorpicker is supposed to show
the color of the currently selected text. This was failing in iframes
because the code was called on the wrong document.

task-2623347

X-original-commit: 7ad6536dd98f9749d63bfc7292e490f6ac629b9c
Part-of: odoo/odoo#83254
This commit is contained in:
Antoine Guenet
2022-01-24 14:13:45 +00:00
parent a565e73574
commit c616f38f77
@@ -1390,7 +1390,7 @@ export class OdooEditor extends EventTarget {
if (hasGradient && hasTextGradientClass) {
foreColor = backgroundImage;
} else {
foreColor = document.queryCommandValue('foreColor');
foreColor = this.document.queryCommandValue('foreColor');
}
}
if (!hiliteColor) {