From 78b5e4836c5b7aa3159848f30aa6e07bfc83c7e9 Mon Sep 17 00:00:00 2001 From: Nicolas Bayet Date: Thu, 22 Sep 2022 09:43:44 +0000 Subject: [PATCH] [FIX] web_editor: update value only when dirty Before this commit The method `updateValue` was updating value constantly because `value` was a string and `this.props.value` a Markup. Now Update only when necessary closes odoo/odoo#100965 X-original-commit: 45d4ac14f65c53dcde56592715d50169bde116ad Signed-off-by: Antoine Guenet (age) --- addons/web_editor/static/src/js/backend/html_field.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_editor/static/src/js/backend/html_field.js b/addons/web_editor/static/src/js/backend/html_field.js index 50f229d88e4..815b0d603b2 100644 --- a/addons/web_editor/static/src/js/backend/html_field.js +++ b/addons/web_editor/static/src/js/backend/html_field.js @@ -186,7 +186,7 @@ export class HtmlField extends Component { } updateValue() { const value = this.getEditingValue(); - if (value !== null && value !== this.props.value) { + if (value !== null && value !== (this.props.value || '').toString()) { if (this.props.setDirty) { this.props.setDirty(true); }