Skip to content

Commit 59ef73f

Browse files
committed
check the scroll height of the correct element
1 parent 9b099b5 commit 59ef73f

File tree

1 file changed

+2
-1
lines changed
  • extensions/notebook-renderers/src

1 file changed

+2
-1
lines changed

extensions/notebook-renderers/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ function initializeScroll(scrollableElement: HTMLElement, disposables: Disposabl
209209
}
210210

211211
// Find the scrollTop of the existing scrollable output, return undefined if at the bottom or element doesn't exist
212-
function findScrolledHeight(scrollableElement: HTMLElement): number | undefined {
212+
function findScrolledHeight(container: HTMLElement): number | undefined {
213+
const scrollableElement = container.querySelector(scrollableClass);
213214
if (scrollableElement && scrollableElement.scrollHeight - scrollableElement.scrollTop - scrollableElement.clientHeight > 2) {
214215
// not scrolled to the bottom
215216
return scrollableElement.scrollTop;

0 commit comments

Comments
 (0)