mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 15:14:56 -04:00
Fixed editor changes will cause syncScrollToView
This commit is contained in:
parent
85078fd328
commit
3718238277
2 changed files with 5 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue