mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-02 12:47:41 +02:00
Desktop: Fixes #7617: Note editor scrolls back to top when editing certain notes
This commit is contained in:
parent
27bec674a0
commit
2813f93c18
@ -137,6 +137,13 @@
|
||||
// calculates viewer's GUI-dependent pixel-based raw percent
|
||||
const viewerPercent = scrollmap.translateL2V(percent);
|
||||
const newScrollTop = viewerPercent * maxScrollTop();
|
||||
|
||||
// Even if the scroll position hasn't changed (percent is the same),
|
||||
// we still ignore the next scroll event, so that it doesn't create
|
||||
// undesired side effects.
|
||||
// https://github.com/laurent22/joplin/issues/7617
|
||||
ignoreNextScrollEvent();
|
||||
|
||||
if (Math.floor(contentElement.scrollTop) !== Math.floor(newScrollTop)) {
|
||||
ignoreNextScrollEvent();
|
||||
percentScroll_ = percent;
|
||||
|
Loading…
Reference in New Issue
Block a user