From 89de96410a1463bbafaa27f4c5bef0122ed747c1 Mon Sep 17 00:00:00 2001 From: Gorash Date: Wed, 22 May 2019 09:40:38 +0000 Subject: [PATCH] [FIX] web_editor: render mass_mailing content after save For some Chome version (e.g. 74 chrome verion on Debian) the iframe trigger 'load' event twice (one time for document and on time for body), the widget must insert the content in the body. Before this fix, the content are add only one time and are removed by the next iframe loading. closes odoo/odoo#33561 Signed-off-by: Toufik Benjaa (tbe) --- addons/web_editor/static/src/js/backend/field_html.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ef443889484..040082f6044 100644 --- a/addons/web_editor/static/src/js/backend/field_html.js +++ b/addons/web_editor/static/src/js/backend/field_html.js @@ -290,7 +290,7 @@ var FieldHtml = basic_fields.DebouncedField.extend(TranslatableFieldMixin, { def.resolve(); }; - this.$iframe.one('load', function onLoad() { + this.$iframe.on('load', function onLoad() { var _avoidDoubleLoad = ++avoidDoubleLoad; ajax.loadAsset(self.nodeOptions.cssReadonly).then(function (asset) { if (_avoidDoubleLoad !== avoidDoubleLoad) {