Merge pull request #356 from colibri-software/inline_editor_firefox_fix

Inline editor bug in Firefox
This commit is contained in:
Mario Visic 2012-04-13 07:21:56 -07:00
commit f7388d14e7
1 changed files with 2 additions and 2 deletions

View File

@ -30,11 +30,11 @@ class Locomotive.Views.InlinEditor.ApplicationView extends Backbone.View
if @_$('meta[name=inline-editor]').size() > 0 if @_$('meta[name=inline-editor]').size() > 0
# bind the resize event. When the iFrame's size changes, update its height # 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 -> iframe_content.resize ->
elem = $(this) 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) iframe.css height: elem.outerHeight(true)
# Resize the iFrame immediately. # Resize the iFrame immediately.