Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

When switching workspaces, jumpToBottom was executing synchronously before browser layout was complete. This caused scrolling to land 'almost at the bottom' instead of fully at the bottom.

The fix uses double requestAnimationFrame (matching performAutoScroll):

  • First frame: allows DOM updates to complete
  • Second frame: measures accurate scrollHeight after layout

setAutoScroll(true) is set immediately to prevent flicker of the 'jump to bottom' button.


Generated with mux

When switching workspaces, jumpToBottom was executing synchronously
before browser layout was complete. This caused scrolling to land
'almost at the bottom' instead of fully at the bottom.

The fix uses double requestAnimationFrame (matching performAutoScroll):
- First frame: allows DOM updates to complete
- Second frame: measures accurate scrollHeight after layout

setAutoScroll(true) is set immediately to prevent flicker of the
'jump to bottom' button.
@ammario ammario merged commit a1ba71d into main Dec 3, 2025
16 checks passed
@ammario ammario deleted the fix-chat-scroll-position branch December 3, 2025 19:23
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.

2 participants