From 7ddfd6285c3e815cfe54231bac9f35e01977c034 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Fri, 27 Nov 2015 11:49:17 +0100 Subject: [PATCH] [FIX] web_editor: update value at inline html save In the base summernote library, each event modifying the editable area DOM trigger an 'onChange' event which update the textarea associated with the editor. Some widget (ImageDialog) have been entirely rewritten for Odoo without copying this behaviour. Hence for those components, if they were the last to be used and only in the instance of inline backend editor (FieldTextHtmlSimple widget), before saving updating the widget value by the current editor value is required. closes #9784 opw-654240 --- addons/web_editor/static/src/js/backend.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_editor/static/src/js/backend.js b/addons/web_editor/static/src/js/backend.js index e7c6d93853d..2c7c86466c1 100644 --- a/addons/web_editor/static/src/js/backend.js +++ b/addons/web_editor/static/src/js/backend.js @@ -122,8 +122,8 @@ var FieldTextHtmlSimple = widget.extend({ if (this.options['style-inline']) { transcoder.class_to_style(this.$content); transcoder.font_to_img(this.$content); - this.internal_set_value(this.$content.html()); } + this.internal_set_value(this.$content.html()); }, destroy_content: function () { $(".oe-view-manager-content").off("scroll");