Skip to content

Commit e75e716

Browse files
authored
fix: Console does not scroll to bottom when code run from notebook (#2114)
Noticed running code from a notebook wasn't scrolling to the bottom on Chrome on Linux at least.
1 parent 7009e21 commit e75e716

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/console/src/Console.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,10 @@ export class Console extends PureComponent<ConsoleProps, ConsoleState> {
655655
if (pane == null) {
656656
return;
657657
}
658-
pane.scrollTo({ top: pane.scrollHeight });
658+
659+
window.requestAnimationFrame(() => {
660+
pane.scrollTo({ top: pane.scrollHeight });
661+
});
659662
}
660663

661664
handleScrollPaneScroll(): void {

0 commit comments

Comments
 (0)