mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 18:28:58 +00:00
* Fix scrolling of markdown preview. * Use scrollDisabledCount. * Stop initializing scrollDisabledCount. * Make scrollTo enough large to occur scroll events. * Should resolve when the error event occurs.
This commit is contained in:
@@ -143,6 +143,7 @@ export function scrollToRevealSourceLine(line: number) {
|
||||
const progressInElement = line - Math.floor(line);
|
||||
scrollTo = previousTop + (rect.height * progressInElement);
|
||||
}
|
||||
scrollTo = Math.abs(scrollTo) < 1 ? Math.sign(scrollTo) : scrollTo;
|
||||
window.scroll(window.scrollX, Math.max(1, window.scrollY + scrollTo));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user