Dolibarr / dolibarr

Dolibarr ERP CRM is a modern software package to manage your company or foundation's activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). it's an open source Web application (written in PHP) designed for businesses of any sizes, foundations and freelancers.
https://www.dolibarr.org
GNU General Public License v3.0
5.26k stars 2.73k forks source link

Feature request - Debounce buttons that submit data #25902

Open Ashley-Butcher opened 1 year ago

Ashley-Butcher commented 1 year ago

Feature Request

When performing button actions in Dolibarr, such as saving lines, it's possible that a user double-clicks the save button, resulting in a double line.

This can be mitigated by implementing debouncing.

Use case

Sometimes a user double-clicks to save a line by accident, resulting in the event occurring twice. When editing invoice lines, this is a small issue as the user can then remove the duplicate line. However, in situations where the button is used to send an email, save an event, or make a tax payment, etc., this can result in multiple transactions in the system that are harder to recover from.

Suggested implementation

There are a number of solutions to the debounce problem, but perhaps the simplest one is beneficial for Dolibarr. That would be to use Javascript to disable buttons that result in submitting data once they are clicked, which would forbid them from firing an event multiple times.

Suggested steps

No response

github-actions[bot] commented 1 week ago

This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 10 days (you should still be able to re-open it if required).