From 65b91e0b66b0d92d990f5fb51a28ed6c0f12e6bf Mon Sep 17 00:00:00 2001 From: Cheng-Han, Wu Date: Tue, 21 Jun 2016 21:48:02 +0800 Subject: Update to handle on view have smaller scrollHeight than editor's shouldn't syncScrollToView after changes --- public/js/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'public') diff --git a/public/js/index.js b/public/js/index.js index c6ef16c8..b9ab7175 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -2781,7 +2781,7 @@ editor.on('changes', function (cm, changes) { windowResize(); } checkEditorScrollbar(); - if (editorHasFocus()) { + if (ui.area.codemirrorScroll[0].scrollHeight > ui.area.view[0].scrollHeight && editorHasFocus()) { postUpdateEvent = function () { syncScrollToView(); postUpdateEvent = null; -- cgit v1.2.3