Skip to content

Incorrect code-expander-button when last line is deleted in a diff #29498

Closed
@silverwind

Description

@silverwind

Description

When the last line of a file is deleted, the diff rendering incorrectly shows a code-expander-button below that last line, and clicking it incorrectly expands the first lines of the file after that last line.

https://try.gitea.io/silverwind/symlink-test/commit/96ab2118ae7afd916791a00531016d99e11c2009

Incorrectly displayed button:

image

Incorrect expansion after click:

image

Works fine if the last line is an addition:

https://try.gitea.io/silverwind/symlink-test/commit/24fb688b579af3c75e0d5cefe1ec4bf721585823

image

Gitea Version

main

Can you reproduce the bug on the Gitea demo site?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic/uiChange the appearance of the Gitea UItype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions