From 939035a16f2d2473dcce57158ba2c854826bd3d5 Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Wed, 9 Dec 2020 16:03:15 +0300 Subject: [PATCH] Fixing autoscroll behavior Signed-off-by: Alex Andreev --- src/renderer/components/dock/pod-log-list.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/renderer/components/dock/pod-log-list.tsx b/src/renderer/components/dock/pod-log-list.tsx index 392e0eefc0..b403c055d8 100644 --- a/src/renderer/components/dock/pod-log-list.tsx +++ b/src/renderer/components/dock/pod-log-list.tsx @@ -95,15 +95,9 @@ export class PodLogList extends React.Component { @action setLastLineVisibility = (props: ListOnScrollProps) => { const { scrollHeight, clientHeight } = this.virtualListDiv.current; - const { scrollOffset, scrollDirection } = props; + const { scrollOffset } = props; - if (scrollDirection == "backward") { - this.isLastLineVisible = false; - } else { - if (clientHeight + scrollOffset === scrollHeight) { - this.isLastLineVisible = true; - } - } + this.isLastLineVisible = clientHeight + scrollOffset === scrollHeight; }; /**