Skip to content

Anchors break after clicked once #21680

Closed
@ell1e

Description

@ell1e

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions