Fix list autoscroll#6427
Open
AmeeteSh-A wants to merge 5 commits into
Open
Conversation
Contributor
|
This is not desirable behavior all the time for all uses of List. I think it will need a new API (either a method or a property on the list struct) to control whether auto-scroll-to-bottom should be activated or not. |
Contributor
Author
Fair call, just added an AutoScroll bool property to the List struct.., and updated the tests |
hkparker
reviewed
Jul 18, 2026
Contributor
|
This also came up in the community meeting yesterday. And I think @andydotxyz suggested the idea of a gravity attribute before as well, which would be able to support auto scroll up, down, or not at all. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
This change addresses issue #6306 by implementing auto-scroll stickiness for widget.List. Previously, when items were appended to the list, the scroll position remained static, which was problematic for use cases like chat logs or real-time feeds where users expect the view to stay locked to the bottom if they are already there.
The implementation captures the scroll state before the list Refresh() and determines if the user is at the bottom of the content. If they are, it programmatically triggers ScrollToBottom() after the layout update, preserving the expected "sticky" behavior.
Fixes #6306
Checklist: