Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/cli/src/ui/components/shared/VirtualizedList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,11 @@ function VirtualizedList<T>(
prevTotalHeight.current - prevContainerHeight.current - 1;
const wasAtBottom = contentPreviouslyFit || wasScrolledToBottomPixels;

if (wasAtBottom && actualScrollTop >= prevScrollTop.current) {
// Only re-enable isStickingToBottom when the user is genuinely at the
// bottom (not just when content previously fit). This prevents the scroll
// from jumping back to the bottom when the user has scrolled up to review
// changes (e.g., after Ctrl+S) and new content arrives. (#5009)
if (!contentPreviouslyFit && wasScrolledToBottomPixels && actualScrollTop >= prevScrollTop.current) {
if (!isStickingToBottom) {
setIsStickingToBottom(true);
}
Expand Down