diff --git a/addons/web_editor/static/src/js/backend.js b/addons/web_editor/static/src/js/backend.js index 062b91bd7a2..0b0851a19f5 100644 --- a/addons/web_editor/static/src/js/backend.js +++ b/addons/web_editor/static/src/js/backend.js @@ -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() {