]> source.dussan.org Git - gitea.git/commit
Use "is-loading" to avoid duplicate form submit for code comment (#28143) (#28147)
authorGiteabot <teabot@gitea.io>
Tue, 21 Nov 2023 04:02:58 +0000 (12:02 +0800)
committerGitHub <noreply@github.com>
Tue, 21 Nov 2023 04:02:58 +0000 (12:02 +0800)
commitffab076b72fb5822531f24f9e608f3b49bb2d324
tree3bd9d2ef9e26b9d7a89b80a7b054c822c75209f1
parent117d9a117fd124c008895bbabecdbfac1dfac653
Use "is-loading" to avoid duplicate form submit for code comment (#28143) (#28147)

Backport #28143 by @wxiaoguang

Compare by ignoring spaces:
https://github.com/go-gitea/gitea/pull/28143/files?diff=split&w=1

When the form is going to be submitted, add the "is-loading" class to
show an indicator and avoid user UI events.

When the request finishes (success / error), remove the "is-loading"
class to make user can interact the UI.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
web_src/js/features/repo-diff.js