diff options
Diffstat (limited to '')
-rw-r--r-- | public/js/syncscroll.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/public/js/syncscroll.js b/public/js/syncscroll.js index 524d60a9..f0c7491b 100644 --- a/public/js/syncscroll.js +++ b/public/js/syncscroll.js @@ -115,8 +115,11 @@ var viewScrollingDelay = 200; var viewScrollingTimer = null; //editor.on('scroll', _.throttle(syncScrollToView, editorScrollThrottle)); -editor.on('scroll', syncScrollToView); -ui.area.codemirrorScroll.on('scroll', syncScrollToView); +if (editor.getOption('scrollbarStyle') === 'native') { + ui.area.codemirrorScroll.on('scroll', syncScrollToView); +} else { + editor.on('scroll', syncScrollToView); +} ui.area.view.on('scroll', function () { viewScrolling = true; clearTimeout(viewScrollingTimer); |