mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 14:44:43 -04:00
Update and fix editor might not sync scrolling from edit mode to both mode
This commit is contained in:
parent
e9b0ce8e04
commit
d90acf88e3
2 changed files with 17 additions and 14 deletions
|
@ -120,11 +120,7 @@ var viewScrollingDebounce = 200;
|
|||
var editScrolling = false;
|
||||
var editScrollingDebounce = 200;
|
||||
|
||||
if (editor.getOption('scrollbarStyle') === 'native') {
|
||||
ui.area.codemirrorScroll.on('scroll', _.throttle(syncScrollToView, editScrollThrottle));
|
||||
} else {
|
||||
editor.on('scroll', _.throttle(syncScrollToView, editScrollThrottle));
|
||||
}
|
||||
ui.area.codemirrorScroll.on('scroll', _.throttle(syncScrollToView, editScrollThrottle));
|
||||
ui.area.view.on('scroll', _.throttle(syncScrollToEdit, viewScrollThrottle));
|
||||
|
||||
var scrollMap, lineHeightMap, viewTop, viewBottom;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue