Skip to content

fix: stop centering the viewport on mouse line clicks in diffs - #384

Merged
glehmann merged 1 commit into
mainfrom
gln/fix-diff-viewport-centering-pxmr
Sep 1, 2026
Merged

fix: stop centering the viewport on mouse line clicks in diffs#384
glehmann merged 1 commit into
mainfrom
gln/fix-diff-viewport-centering-pxmr

Conversation

@glehmann

@glehmann glehmann commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Every line click re-centered the focused line, breaking double-click
word selection because the first click moved the content under the
cursor. Focus changes now carry their source; only keyboard and
programmatic focus keep the centering scroll, while mouse clicks
never move the viewport.

The inline comment form now scrolls itself fully into view on open
with the smallest possible scroll, so clicking a line near the
viewport bottom still shows the whole form.

Every line click re-centered the focused line, breaking double-click
word selection because the first click moved the content under the
cursor. Focus changes now carry their source; only keyboard and
programmatic focus keep the centering scroll, while mouse clicks
never move the viewport.

The inline comment form now scrolls itself fully into view on open
with the smallest possible scroll, so clicking a line near the
viewport bottom still shows the whole form.
@glehmann
glehmann merged commit 60479ec into main Sep 1, 2026
6 checks passed
@glehmann
glehmann deleted the gln/fix-diff-viewport-centering-pxmr branch September 1, 2026 16:58
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.

1 participant