@cursor_visible = false
@poll_for_blur_timeout = null
@iframe_offset = null
+ @iframe_height = null
opt_fragment = @options.fragment ? true
@parser_opts = {}
if opt_fragment
@load_html @in_el.value
@adjust_iframe_height()
adjust_iframe_height: ->
- @iframe.style.height = "0"
- @iframe.style.height = "#{@idoc.body.scrollHeight}px"
+ h = parseInt(@idoc.body.scrollHeight, 10)
+ if @iframe_height isnt h
+ @iframe_height = h
+ s = @wrap2.scrollTop
+ @iframe.style.height = "0"
+ @iframe.style.height = "#{h}px"
+ @wrap2.scrollTop = s
kill_cursor: -> # remove it, forget where it was
if @cursor_visible
@cursor_el.parentNode.removeChild @cursor_el