[BUG]: Scrolling jitter and extreme scroll behavior using mouse wheel/trackpad #132
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
While using the Flotilla web app, I noticed a major issue with scrolling behavior.
When scrolling via mouse wheel or trackpad, the UI starts jittering and often jumps to extreme positions. This makes normal scrolling almost unusable. However, when I manually drag the scrollbar from the right side, scrolling works as expected.
This issue is consistently reproducible and significantly impacts usability.
Steps to Reproduce
Open the Flotilla web app
Try scrolling using mouse wheel or trackpad
Observe jittery behavior and sudden extreme scroll jumps
Try dragging the scrollbar manually → works fine
Expected Behavior
Smooth and controlled scrolling using mouse wheel/trackpad, similar to standard web apps.
Actual Behavior
UI jitters while scrolling
Sudden jumps to extreme scroll positions
Normal scrolling becomes unreliable
Once scrolling is done using the trackpad or the mouse wheel (Both tested), the scrolling gets stuck in many cases or keeps jittering. The only option is to refresh the tab.
Environment
Browser: Chrome
Device: Laptop (core i5 11th Gen, 16 GB RAM, RTX 3050ti)
Also reproducible in Chrome DevTools responsive mode
Additional Context
My laptop is almost always freezing when I try to switch into devtools with responsive viewports and scroll
The issue does not occur when dragging the scrollbar manually
Attachments (Screen Recording)
Very strange, I am able to replicate this. We do lots of scroll handling stuff in the chat view, so that's likely the culprit here.
Hey @hodlbod can I work on this issue ?
Have at it, I just assigned it to you.
Adding onto this, I encountered a similar issue with spring-like behaviour on mobile devices. Putting it here so proper testing and fixes can be performed.
@hodlbod I’ve been facing this issue for a while and looked into the codebase. It seems the chat feed loader keeps updating the scroll container while you’re scrolling. In reversed chat layouts, this causes visible jumps or jitter.
The reason it feels worse with a mouse wheel or trackpad is likely because they generate continuous scrolling input. While this is happening, new messages are being loaded, so the layout keeps changing mid-scroll. In contrast, dragging the scrollbar is more direct and doesn’t trigger as many repeated updates, so it feels smoother.
I see, maybe the fix would just be to detect scroll and not do any scroll control if active.
@hodlbod Should i give this a go?
Please do!