From 6c22b1995a894c76fd54349f978a36fd09960bc9 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Tue, 8 Mar 2016 11:31:48 -0500 Subject: [PATCH] improve scrolling a bit --- editor.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/editor.coffee b/editor.coffee index 370f2a1..c3f35be 100644 --- a/editor.coffee +++ b/editor.coffee @@ -564,7 +564,6 @@ class PeachHTML5Editor if @options.editor_id? @outer_iframe.setAttribute 'id', @options.editor_id @outer_iframe.onload = => - console.log 'outer onload' @outer_idoc = @outer_iframe.contentDocument icss = domify @outer_idoc, style: children: [ domify @outer_idoc, text: css @@ -723,6 +722,8 @@ class PeachHTML5Editor @in_el.value = dom_to_html @tree @in_el.onchange = => @load_html @in_el.value + @iframe.style.height = "0" + @iframe.style.height = "#{@idoc.body.scrollHeight}px" kill_cursor: -> # remove it, forget where it was if @cursor_visible @cursor_el.parentNode.removeChild @cursor_el -- 1.7.10.4