sindresorhus/refined-github

Avoid jumps when showing/hiding PR comments #2329

dorian-marchal posted onGitHub

On a pull request, when comments are toggled with <kbd>i</kbd>, Github scrolls back to the top of the page, making it difficult to keep on reviewing.

You can try it in this pull request: https://github.com/sindresorhus/refined-github/pull/2087/files

  • Scroll to a comment
  • Press <kbd>i</kbd>

Currently, I click and hold the scroll bar to avoid the jump but as the page height changes, this is not always ideal.


If anyone comes up with a possible fix, the suggested feature name could be: fix-toggle-pr-comments-scroll-bug

Related issue: https://github.com/sindresorhus/refined-github/issues/2398 Bug also discussed in https://github.com/sindresorhus/refined-github/pull/2087


Please also send this bug report to GitHub: support@github.com

posted by fregante over 5 years ago

I just tried it and it looks like it was fixed.

posted by yakov116 almost 5 years ago

It looks like the old bug (as described) has been fixed, but (ugh) in only Firefox, the "visual scroll" position isn't preserved — i.e. when items disappear, the page shortens so you'll end up at the bottom of the page.

In other words: https://stackoverflow.com/questions/18461567/maintain-scrolltop-while-inserting-new-sections-above-the-current-viewed-element

Chrome recently fixed this so users don't see content jumping around when off-screen elements are changed, but Firefox apparently not.

Leaving open in case anyone knows how to fix that.

posted by fregante almost 5 years ago

Closing due to inactivity. Tough bug best resolved by GitHub anyway, if they haven’t already

posted by fregante about 4 years ago

Fund this Issue

$0.00
Funded

Pull requests