[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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user