Skip to content

Fix ScrollArea::scroll_to_* calls when stick_to_bottom is Active#8033

Open
AmmarAbouZor wants to merge 1 commit intoemilk:mainfrom
AmmarAbouZor:fix-scroll-with-stick
Open

Fix ScrollArea::scroll_to_* calls when stick_to_bottom is Active#8033
AmmarAbouZor wants to merge 1 commit intoemilk:mainfrom
AmmarAbouZor:fix-scroll-with-stick

Conversation

@AmmarAbouZor
Copy link
Copy Markdown

It includes:

  • Fix for ScrollArea when scroll_to_* could be ignored when stick_to_bottom(true) was active and the viewport was already stuck to the bottom.
  • The fix is by making explicit per-axis scroll movement take priority over sticky-end snapping for that frame, and avoid immediately re-marking animated scrolls as still stuck.
  • I've also added a regression test for this issue to ensure it will be caught on further code changes.

The code snippets form the original issue can be used for testing here as well

@github-actions
Copy link
Copy Markdown

Preview is being built...

Preview will be available at https://egui-pr-preview.github.io/pr/8033-fix-scroll-with-stick

View snapshot changes at kitdiff

* Fix when `ScrollArea::stick_to_bottom` is enabled and the viewport is
  at the last item, `ui.scroll_to_*` calls can be ignored.
* Fix by treating the final per-axis explicit scroll delta as higher
  priority than sticky-end snapping for that frame.
* Add a regression test to ensure this edge case is still covered.
@AmmarAbouZor AmmarAbouZor force-pushed the fix-scroll-with-stick branch from 7810184 to 60f218f Compare April 1, 2026 06:44
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.

ScrollArea: scroll_to_* Calls are Ignored when Stick to Bottom is active

1 participant