[FIX] web_editor: iframe of html widget must be checked before render value

If the iframe is destroyed, detached, hide (eg: click on a record, return into the list view and click on an other record), the render_value method try to resize the iframe but jQery raise an exception because contentWindow doesn't exist.
This commit is contained in:
Christophe Matthieu
2015-09-21 13:45:36 +02:00
parent f89e8f9df2
commit a41f915493
+3 -1
View File
@@ -295,7 +295,9 @@ var FieldTextHtml = widget.extend({
}
} else {
this.$content.html(value);
this.$iframe.css("height", (this.$body.height()+20) + "px");
if (this.$iframe[0].contentWindow) {
this.$iframe.css("height", (this.$body.height()+20) + "px");
}
}
},
is_false: function() {