Skip to content

Commit

Permalink
fix: Console history scroll not always sticking to bottom (#2314)
Browse files Browse the repository at this point in the history
- Cherry-pick of: console scrolls on 1st code block run (#2275)
- Cherry-pick of: Console does not scroll to bottom when code run from
notebook (#2114)
- Tested by running a large block of code

---------

Co-authored-by: Matthew Runyon <matthewrunyon@deephaven.io>
Co-authored-by: Steven Wu <wusteven815@gmail.com>
  • Loading branch information
3 people authored Dec 26, 2024
1 parent 40ef6f7 commit 44cbdb2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/console/src/Console.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ export class Console extends PureComponent<ConsoleProps, ConsoleState> {
return;
}

this.scrollConsoleHistoryToBottom();
this.updateHistory(result, newHistoryItem);
this.updateKnownObjects(newHistoryItem);
this.updateWorkspaceHistoryItem(
Expand Down Expand Up @@ -649,7 +650,7 @@ export class Console extends PureComponent<ConsoleProps, ConsoleState> {
}

window.requestAnimationFrame(() => {
pane.scrollTop = pane.scrollHeight;
pane.scrollTo({ top: pane.scrollHeight });
});
}

Expand Down

0 comments on commit 44cbdb2

Please sign in to comment.