Skip to content

"Show more files" button sometimes doesn't work when large number of files changed by a diff #37902

@intelmatt

Description

@intelmatt

Gitea Version

1.25.4

What happened?

First of all, this issue is already fixed on main and 1.25 and 1.26 branches. I'm opening it here only for tracking of the existing issue in 1.25.4.

In v1.25.4, the "Show more files" button shown when a diff has more files than MaxGitDiffFiles loads additional file boxes via fetch and inserts them with replaceWith. The handler loadMoreFiles() does not call window.htmx.process() on the new content, so htmx never wires click handlers to the code-expander-buttons inside the newly-loaded files. The sibling handler for a.diff-load-button (per-file "load diff" button) does call window.htmx.process(el) after replacement; loadMoreFiles() was missed.

How are you running Gitea?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/needs-feedbackFor bugs, we need more details. For features, the feature must be described in more detailtype/bug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions