mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Merge pull request #180738 from microsoft/aamunger/scrollingWhileStreaming
don't stick the scrollbar to the bottom if scrolled up
This commit is contained in:
commit
af8b51ed1e
|
@ -209,7 +209,8 @@ function initializeScroll(scrollableElement: HTMLElement, disposables: Disposabl
|
|||
}
|
||||
|
||||
// Find the scrollTop of the existing scrollable output, return undefined if at the bottom or element doesn't exist
|
||||
function findScrolledHeight(scrollableElement: HTMLElement): number | undefined {
|
||||
function findScrolledHeight(container: HTMLElement): number | undefined {
|
||||
const scrollableElement = container.querySelector(scrollableClass);
|
||||
if (scrollableElement && scrollableElement.scrollHeight - scrollableElement.scrollTop - scrollableElement.clientHeight > 2) {
|
||||
// not scrolled to the bottom
|
||||
return scrollableElement.scrollTop;
|
||||
|
|
Loading…
Reference in a new issue