summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGorash <chm@odoo.com>2019-05-22 09:40:38 +0000
committerGorash <chm@odoo.com>2019-05-22 11:54:25 +0000
commit89de96410a1463bbafaa27f4c5bef0122ed747c1 (patch)
treec91016b91df1754f05c279c846edd60c0dac9963
parent1569bef308d6e7769288ebe20d8a30a952439e2e (diff)
[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) <tbe@odoo.com>
-rw-r--r--addons/web_editor/static/src/js/backend/field_html.js2
1 files changed, 1 insertions, 1 deletions
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) {