Skip to content

Restore submit button double-click guard on summary page - #471

Merged
nayij merged 1 commit into
mainfrom
fix/restore-summary-submit-debounce
Sep 21, 2026
Merged

nayij merged 1 commit into
mainfrom
fix/restore-summary-submit-debounce

Conversation

@nayij

@nayij nayij commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

The prevent-multiple-clicks class added in #413 was dropped when the i18n-linting branch (#436) was merged, leaving the summary submit button with preventDoubleClick: false and no client-side guard at all. Users clicking Submit repeatedly on a slow submission (e.g. many file uploads) could trigger duplicate form submissions.

Re-add the class so debounce-click.js ignores repeat clicks for 10s, and add a test that renders the real summary page, runs initDebounceClick() against it and asserts a double click only submits the form once.

Proposed change

Jira ticket:

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Misc. (documentation, build updates, etc)

Checklist

  • You have executed this code locally and it performs as expected.
  • You have added tests to verify your code works.
  • You have added code comments and JSDoc, where appropriate.
  • There is no commented-out code.
  • You have added developer docs in README.md and docs/* (where appropriate, e.g. new features).
  • The tests are passing (npm run test).
  • The linting checks are passing (npm run lint).
  • The code has been formatted (npm run format).

The prevent-multiple-clicks class added in #413 was dropped when the
i18n-linting branch (#436) was merged, leaving the summary submit button
with preventDoubleClick: false and no client-side guard at all. Users
clicking Submit repeatedly on a slow submission (e.g. many file uploads)
could trigger duplicate form submissions.

Re-add the class so debounce-click.js ignores repeat clicks for 10s, and
add a test that renders the real summary page, runs initDebounceClick()
against it and asserts a double click only submits the form once.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@nayij
nayij merged commit a8db337 into main Sep 21, 2026
26 checks passed
@nayij
nayij deleted the fix/restore-summary-submit-debounce branch September 21, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants