-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Anchors break after clicked once #21680
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
Labels
Comments
Might be some JS interference, I'm not sure. |
This happens on the central gitea instance for me (https://gitea.com) but interestingly not my own at https://git.apachejuice.dev (for example in this page the anchors seem to work fine) Edited: lack of closing paren |
I can reproduce on your instance as well:
|
I did the exact same, although after reloading the page it appears too |
silverwind
added a commit
to silverwind/gitea
that referenced
this issue
Nov 24, 2022
The hashchange event did not fire on re-click of a active anchor. Instead, use the click event. Fixes: go-gitea#21680
lunny
added a commit
that referenced
this issue
Nov 26, 2022
The hashchange event did not fire on re-click of a active anchor. Instead, use the click event which always fires. Fixes: #21680 Co-authored-by: Lunny Xiao <[email protected]> Co-authored-by: zeripath <[email protected]>
silverwind
added a commit
to silverwind/gitea
that referenced
this issue
Nov 26, 2022
The hashchange event did not fire on re-click of a active anchor. Instead, use the click event which always fires. Fixes: go-gitea#21680 Co-authored-by: Lunny Xiao <[email protected]> Co-authored-by: zeripath <[email protected]>
lunny
added a commit
that referenced
this issue
Nov 26, 2022
Backport #21931. The hashchange event did not fire on re-click of a active anchor. Instead, use the click event which always fires. Fixes: #21680 Co-authored-by: Lunny Xiao <[email protected]> Co-authored-by: zeripath <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
I noticed something which makes navigating documentation on gitea quite irritating: anchors break after clicked once. An anchor on every other page I've ever visited can be clicked multiple times in a row with scrolling in between, and every subsequent click will re-center the view to the anchor. Not when viewing a markdown file on Gitea however, only the first click works and then it just won't recenter anymore.
Try here by clicking the "Test anchor", then scrolling away with it still in view, then click it again (which should recenter the view once more and undo the scroll, but it doesn't): https://try.gitea.io/blablablablab/BlaTest/src/branch/main/README.md
Gitea Version
1.19.0+dev-39-g2900dc90a
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
Screencast.from.11-04-2022.12.52.41.PM.webm
Git Version
No response
Operating System
No response
How are you running Gitea?
I'm not, but this reproduces on all instances run by others that i have tested
Database
No response
The text was updated successfully, but these errors were encountered: