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

Modal: Double clicking primary button triggers primary action twice #26459

Open
cogk opened this issue May 16, 2024 · 1 comment
Open

Modal: Double clicking primary button triggers primary action twice #26459

cogk opened this issue May 16, 2024 · 1 comment
Labels

Comments

@cogk
Copy link
Contributor

cogk commented May 16, 2024

Double clicking primary button triggers primary action twice.
Could be a "won't fix", but this happened to one of my users today.

I don't really know how it could be prevented, maybe disable the button once clicked, and re-enable it on failure/after a timeout?

double-click-primary-button.webm
@cogk cogk added the bug label May 16, 2024
@ankush
Copy link
Member

ankush commented May 17, 2024

frappe.call does take btn argument which can be used to disable the button during request.

Not sure how it can be achieved from modal API though.

Modal triggers might exit quickly but they might be doing something async so we don't truly know if trigger actually completed or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants