Skip to content

Comments

fix: reset scroll when navigating study chapters#2164

Merged
veloce merged 1 commit intolichess-org:mainfrom
OldUser101:OldUser101/push-kztuoqsnunmm
Sep 7, 2025
Merged

fix: reset scroll when navigating study chapters#2164
veloce merged 1 commit intolichess-org:mainfrom
OldUser101:OldUser101/push-kztuoqsnunmm

Conversation

@OldUser101
Copy link
Contributor

The scroll position in the study comment persists even after the text is changed.

This results in behaviour that results in the user having to manually scroll to the top of the comment if they want to read the text.

This PR resets the scroll position when the widget changes, to save the user having to manually scroll.

@OldUser101 OldUser101 marked this pull request as draft September 2, 2025 12:32
@OldUser101 OldUser101 marked this pull request as ready for review September 3, 2025 07:36
@veloce
Copy link
Contributor

veloce commented Sep 5, 2025

Hi! Not sure to understand the problem here; can you post a before/after screen recording please?

@OldUser101
Copy link
Contributor Author

Before the change, when moving to the second page, I have to manually scroll upwards, since the scroll position doesn't reset.

before.mp4

After the change, this is automatic when any content is changed.

after.mp4

@veloce veloce merged commit 3b4c145 into lichess-org:main Sep 7, 2025
1 check passed
@OldUser101 OldUser101 deleted the OldUser101/push-kztuoqsnunmm branch September 7, 2025 20:59
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