Skip to content

Commit 93687a7

Browse files
authored
fix: Console History Not Scrolling to Bottom (DH-14062) (#1481)
I discovered DH-14062 independently and found that this method occasionally was prematurely returning when the view should stay stuck to the bottom of the contents. Sometimes `pane.scrollTop` is sometimes 0.5 less than the expected value when tailing the content. This `Math.round` bumps it up. I only saw `xxxxx.0` and `xxxxx.5` values during investigation, but I did not do any further research on the origin of the value or the rounding error. Here is a sample groovy snippet that reproduces 100% of the time: ```groovy import io.deephaven.internal.log.LoggerFactory log = LoggerFactory.getLogger(Object.class log.error().append(new RuntimeException()).endl() t = io.deephaven.engine.util.TableTools.timeTable("PT1s") ```
1 parent 45e2ada commit 93687a7

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
@@ -614,7 +614,10 @@ export class Console extends PureComponent<ConsoleProps, ConsoleState> {
614614
scrollConsoleHistoryToBottom(force = false): void {
615615
const pane = this.consoleHistoryScrollPane.current;
616616
assertNotNull(pane);
617-
if (!force && pane.scrollTop < pane.scrollHeight - pane.offsetHeight) {
617+
if (
618+
!force &&
619+
Math.abs(pane.scrollHeight - pane.clientHeight - pane.scrollTop) >= 1
620+
) {
618621
return;
619622
}
620623

0 commit comments

Comments
 (0)