Skip to content

Commit fb8f98c

Browse files
committed
fix(webapp): treat a one pixel upward log scroll as leaving the bottom
1 parent 4f97cb6 commit fb8f98c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/webapp/app/hooks/useFollowScroll.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function useFollowScroll(containerRef: RefObject<HTMLElement | null>, con
1414
const onScroll = () => {
1515
const { scrollTop, scrollHeight, clientHeight } = container;
1616
const distance = scrollHeight - scrollTop - clientHeight;
17-
const movedUp = scrollTop < lastScrollTop && distance > 1;
17+
const movedUp = scrollTop < lastScrollTop && distance >= 1;
1818
lastScrollTop = scrollTop;
1919
setIsAtBottom(!movedUp && distance <= AT_BOTTOM_TOLERANCE_PX);
2020
};

0 commit comments

Comments
 (0)