Skip to content

Fix scrollToComposer scrolling the window#12

Open
zattak1 wants to merge 1 commit intoQbix:mainfrom
zattak1:fix/chat-scroll-into-view-window
Open

Fix scrollToComposer scrolling the window#12
zattak1 wants to merge 1 commit intoQbix:mainfrom
zattak1:fix/chat-scroll-into-view-window

Conversation

@zattak1
Copy link
Copy Markdown

@zattak1 zattak1 commented Apr 14, 2026

Summary

  • scrollToComposer calls scrollIntoView/scrollIntoViewIfNeeded on the chat composer element, which can scroll any ancestor — including the window — when the chat tool is inside a newly pushed column that hasn't established its own scroll context yet
  • This causes the page to jump to the footer when opening a Conversation panel from an event details page, creating a janky experience and hiding the close button
  • Fix: save and restore window.scrollY around the scrollIntoView calls so only the chat's internal container scrolls

Test plan

  • Open an event details page in a Communities app
  • Click the Conversation button to open the chat column
  • Verify the page does NOT scroll to the footer
  • Verify the chat composer is still visible and scrolled into view within its own column
  • Verify sending messages and receiving messages still auto-scroll within the chat column

🤖 Generated with Claude Code

scrollIntoView/scrollIntoViewIfNeeded can scroll any ancestor,
including the window, when the chat tool is inside a column that
hasn't fully established its own scroll context yet. This causes
the page to jump to the footer when opening a conversation panel
from an event details page.

Save and restore the window scroll position around the
scrollIntoView calls so only the chat's internal container scrolls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant