diff --git a/app/assets/javascripts/locomotive/views/inline_editor/application_view.js.coffee b/app/assets/javascripts/locomotive/views/inline_editor/application_view.js.coffee index 9ed71b53..2f242986 100644 --- a/app/assets/javascripts/locomotive/views/inline_editor/application_view.js.coffee +++ b/app/assets/javascripts/locomotive/views/inline_editor/application_view.js.coffee @@ -30,11 +30,11 @@ class Locomotive.Views.InlinEditor.ApplicationView extends Backbone.View if @_$('meta[name=inline-editor]').size() > 0 # bind the resize event. When the iFrame's size changes, update its height - iframe_content = iframe.contents().find('body') + iframe_content = iframe.contents() iframe_content.resize -> elem = $(this) - if elem.outerHeight(true) > $('body').outerHeight(true) # Resize the iFrame. + if elem.outerHeight(true) > iframe.outerHeight(true) # Resize the iFrame. iframe.css height: elem.outerHeight(true) # Resize the iFrame immediately.