Skip to content

Commit f98711a

Browse files
committed
Revert "fix(chat): drop ChatGPT-style scroll pin on mobile to stop end-of-stream jump (#2381)"
This reverts commit 9d91d45.
1 parent 2055940 commit f98711a

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

src/lib/components/chat/ChatWindow.svelte

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -376,12 +376,6 @@
376376
function computeSpacerHeight(): number {
377377
if (!chatContainer || !spacerEl) return MIN_SPACER_PX;
378378
379-
// Mobile/touch: skip the ChatGPT-style pin (user message scrolled to the top).
380-
// On iOS, WebKit suppresses programmatic scrolls during touch/momentum, so the
381-
// pin resolves as a jarring jump up when streaming ends. Keeping the spacer at
382-
// its minimum means the view just scrolls to the bottom and follows the stream.
383-
if (!window.matchMedia("(min-width: 768px)").matches) return MIN_SPACER_PX;
384-
385379
const userMsgs = chatContainer.querySelectorAll('[data-message-type="user"]');
386380
const lastUserMsg = userMsgs[userMsgs.length - 1] as HTMLElement | undefined;
387381
if (!lastUserMsg) return MIN_SPACER_PX;

0 commit comments

Comments
 (0)