diff --git a/addons/web_editor/static/lib/odoo-editor/src/commands/commands.js b/addons/web_editor/static/lib/odoo-editor/src/commands/commands.js index 22a970ec789..3efb47ad2e9 100644 --- a/addons/web_editor/static/lib/odoo-editor/src/commands/commands.js +++ b/addons/web_editor/static/lib/odoo-editor/src/commands/commands.js @@ -498,7 +498,7 @@ export const editorCommands = { // Color the selected s and remove uncolored fonts. for (const font of new Set(fonts)) { colorElement(font, color, mode); - if (!hasColor(font, mode) && !hasColor(font, mode)) { + if (!hasColor(font, mode) && !font.hasAttribute('style')) { for (const child of [...font.childNodes]) { font.parentNode.insertBefore(child, font); }