Skip to content
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

Click buttons quickly in some forms will submit repeated/duplicated requests #17111

Closed
wxiaoguang opened this issue Sep 21, 2021 · 6 comments
Closed
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented topic/ui Change the appearance of the Gitea UI type/bug

Comments

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Sep 21, 2021

Description

All Gitea versions. Click buttons quickly in Issue form will submit repeated requests.

About UI/UX: because there is no UI feedback to users and the buttons are still clickable, when there is a laggy network, user may click buttons multiple times, then there will be many duplicated comments.

Related PRs (but it still needs more work)

Remaining works:

  • check and prevent repeated requests for other forms
  • prevent repeated requests for AJAX requests

Screenshots

image

NOTICE: This issue is not completely fixed. Some buttons have been fixed by #16157, but this issue is out-dated, so close it.

@delvh
Copy link
Member

delvh commented Sep 21, 2021

I would say that is the same error as #6859 on another form.
This seems to be a general submission problem.

@wxiaoguang

This comment has been minimized.

@delvh

This comment has been minimized.

@lunny

This comment has been minimized.

@lunny lunny added the topic/ui Change the appearance of the Gitea UI label Oct 21, 2021
@wxiaoguang wxiaoguang changed the title Click buttons quickly in Issue form will submit repeated requests Click buttons quickly in some forms will submit repeated requests Dec 8, 2021
@wxiaoguang wxiaoguang changed the title Click buttons quickly in some forms will submit repeated requests Click buttons quickly in some forms will submit repeated/duplicated requests (issues/comments) Dec 8, 2021
@wxiaoguang wxiaoguang added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Dec 8, 2021
@wxiaoguang wxiaoguang changed the title Click buttons quickly in some forms will submit repeated/duplicated requests (issues/comments) Click buttons quickly in some forms will submit repeated/duplicated requests (issues/comments/merges) Dec 8, 2021
@wxiaoguang wxiaoguang changed the title Click buttons quickly in some forms will submit repeated/duplicated requests (issues/comments/merges) Click buttons quickly in some forms will submit repeated/duplicated requests May 7, 2022
@silverwind
Copy link
Member

I think a proper solution would be to interject all form submissions via JS, stop them and re-execute them via fetch. This can be used to prevent duplicate submission and more importantly enables to show a potential error message/toast without a page reload.

@wxiaoguang
Copy link
Contributor Author

Some buttons have been fixed by #16157, this issue is out-dated, so close it.

@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

No branches or pull requests

4 participants