Skip to content

Commit

Permalink
chore: revert auto scroll behavior to smooth for log viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
Caleb Kang committed Jul 25, 2020
1 parent 14595f7 commit 0e84ab2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webui/react/src/components/LogViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ const LogViewer: React.FC<Props> = forwardRef((
*/
setTimeout(() => {
if (!container.current) return;
container.current.scrollTo({ behavior: 'auto', top: container.current.scrollHeight });
container.current.scrollTo({ behavior: 'smooth', top: container.current.scrollHeight });
});
} else if (scrollToInfo.isPrepend) {
/*
Expand Down Expand Up @@ -421,7 +421,7 @@ const LogViewer: React.FC<Props> = forwardRef((

const handleScrollToLatest = useCallback(() => {
if (!container.current) return;
container.current.scrollTo({ behavior: 'auto', top: container.current.scrollHeight });
container.current.scrollTo({ behavior: 'smooth', top: container.current.scrollHeight });
}, []);

const logOptions = (
Expand Down

0 comments on commit 0e84ab2

Please sign in to comment.