-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File scrolls out of view when collapsing / marking as viewed via sticky header #23701
Comments
Indeed, it's the same issue. The CSS scroll-margin-top solution on #23702 also takes care of direct links to files in a diff. On the PR diff, this currently shows the previous file first: https://try.gitea.io/jpraet/test/pulls/13/files#diff-b94d08b409f9d05fb65b6cccaf7b3e4ecc7cc333 On the commit diff, the first line of the linked file is currently under the sticky header: https://try.gitea.io/jpraet/test/commit/1a19e6b14e31d295b7372f3346580c3e85690ff5#diff-b94d08b409f9d05fb65b6cccaf7b3e4ecc7cc333 |
# Conflicts: # web_src/css/repository.css
Backport #23702 by @jpraet Fixes #23701, #23515. Alternate approach to #23604 using CSS scroll-margin-top, which is also taken into account for direct links to files in a diff: * On the PR diff, this currently shows the previous file first: https://try.gitea.io/jpraet/test/pulls/13/files#diff-b94d08b409f9d05fb65b6cccaf7b3e4ecc7cc333 * On the commit diff, the first line of the linked file is currently under the sticky header: https://try.gitea.io/jpraet/test/commit/1a19e6b14e31d295b7372f3346580c3e85690ff5#diff-b94d08b409f9d05fb65b6cccaf7b3e4ecc7cc333 Co-authored-by: Jimmy Praet <jimmy.praet@ksz-bcss.fgov.be>
Description
When you are reviewing a file, scrolling down to the end of the file, and then collapsing it via the or by marking it as in the sticky header, the file scrolls out of view and you end up somewhere further on in another file of the diff.
https://try.gitea.io/jpraet/test/pulls/13/files
Screenshots
when I click "viewed" here on the first file:
It disappears out of view and I end up somewhere near the end of the 2nd file, and need to scroll back up to review that 2nd file.
Gitea Version
1.20.0+dev-265-gc5cfc0855
Can you reproduce the bug on the Gitea demo site?
Yes
Operating System
No response
Browser Version
Firefox 102.8.0.esr
The text was updated successfully, but these errors were encountered: