Skip to content

Conversation

@stefanhaller
Copy link
Collaborator

It is possible to scroll the selection out of view using the mouse wheel; after doing this, it would sometimes scroll into view by itself again, for example when a background fetch occurred. In the files panel this would even happen every 10s with every regular files refresh.

Fix this by adding a scrollIntoView parameter to HandleFocus, which is false by default, and is only set to true from controllers that change the selection.

Fixes #5097.

It is possible to scroll the selection out of view using the mouse wheel; after doing this, it would sometimes scroll into view by itself again, for example when a background fetch occurred. In the files panel this would even happen every 10s with every regular files refresh. Fix this by adding a scrollIntoView parameter to HandleFocus, which is false by default, and is only set to true from controllers that change the selection.
@codacy-production
Copy link

codacy-production bot commented Dec 22, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for cf873b11 89.47%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (cf873b1) Report Missing Report Missing Report Missing
Head commit (ce0a1ce) 59359 51658 87.03%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#5134) 19 17 89.47%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

…, even if it didn't change We have this logic to avoid constantly rerendering the main view when hitting up-arrow when you are already at the top of the list. That's good, but we do want to scroll the selection into view if it is outside and you hit up or down, no matter if it changed.
@stefanhaller stefanhaller force-pushed the dont-scroll-selection-into-view-on-refresh branch from 0956418 to ce0a1ce Compare December 22, 2025 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

2 participants