Skip to content

Avoid jumps when showing/hiding PR comments #2329

Closed

Description

@dorian-marchal

On a pull request, when comments are toggled with i, 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 i

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

Activity

  1. fregante commented on Sep 7, 2019

    @fregante
    Member

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

    Related issue: #2398
    Bug also discussed in #2087


    Please also send this bug report to GitHub: [email protected]

  2. yakov116 commented on May 28, 2020

    @yakov116
    Member

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

  3. fregante commented on May 28, 2020

    @fregante
    Member

    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.

  4. added
    firefox
    on May 28, 2020
  5. fregante commented on Mar 11, 2021

    @fregante
    Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedenhancementfirefox

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions