Regression: Double submit prevention breaks with JS

Created on 16 May 2024, 8 months ago
Updated 17 May 2024, 7 months ago

Problem/Motivation

The double submit prevention introduced with πŸ› Double click prevention on form submission Fixed breaks when other JS hooks into the form submit process. The comment #1705618-130: Double click prevention on form submission β†’ describes the problem in more detail and provides a fix.

Steps to reproduce

Have a JavaScript that delays the submit in order to run add some behaviour before the submit (e.g. custom validations). Try to submit the form then it doesn’t work because:

  1. The double submit prevention gets the first submit event and stores the form data in the attribute.
  2. The other JS runs it’s custom tasks and triggers another submit with identical data.
  3. The double submit prevention gets the second submit and prevents it because it has the same data.
  4. Result: The user is unable to submit the form.

Proposed resolution

Check for event.isDefaultPrevented() as described in #1705618-130: Double click prevention on form submission β†’ .

Remaining tasks

Commit the rest of the fix from πŸ› Double click prevention on form submission Fixed .

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

Should perhaps reference the regression introduced with πŸ› Double click prevention on form submission Fixed .

πŸ› Bug report
Status

Postponed

Version

7.0 ⚰️

Component
FormΒ  β†’

Last updated 3 days ago

Created by

πŸ‡¦πŸ‡ΉAustria torotil

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024