From 1bec40e88ef7cb25462c205b96bf4bc5cb17fdf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Geelen=20=28sge=29?= Date: Wed, 27 Apr 2022 09:48:49 +0000 Subject: [PATCH] [FIX] web_editor: save editor value during urgentSave Ensure the current editor value is set in the Odoo FieldHtml during `commitChanges` so it can be used by the `urgentSave` when needed. closes odoo/odoo#89916 X-original-commit: 43dfc8140760497d9f0352897d71ad49b12fd6e5 Signed-off-by: David Monjoie (dmo) --- addons/web_editor/static/src/js/backend/field_html.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web_editor/static/src/js/backend/field_html.js b/addons/web_editor/static/src/js/backend/field_html.js index 1141fa4c3d4..7fb13dbb6fa 100644 --- a/addons/web_editor/static/src/js/backend/field_html.js +++ b/addons/web_editor/static/src/js/backend/field_html.js @@ -100,6 +100,7 @@ var FieldHtml = basic_fields.DebouncedField.extend(TranslatableFieldMixin, { } var _super = this._super.bind(this); this.wysiwyg.odooEditor.clean(); + this._setValue(this._getValue()); return this.wysiwyg.saveModifiedImages(this.$content).then(async () => { await this.wysiwyg.preSavePromise; this._isDirty = this.wysiwyg.isDirty();