Problem/Motivation

JavaScript: Fix double-submission and refactor hosted iframe behavior

- Fixed a bug where clicking the submit button while a token was already present could result in duplicate form submissions. The submit button is now always disabled and the form is always submitted
programmatically, eliminating the unguarded native browser submit path.
- Refactored CardPointeHostedIframe constructor to accept DOM dependencies directly rather than querying them internally, removing the async initialization path.
- Removed Drupal.CommerceCardPointeInstances global in favour of relying on once() to guard against re-initialization on AJAX re-attaches.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

tomtech created an issue. See original summary.

  • 5cc98327 committed on 2.x
    fix: #3592790 Fix double-submission and refactor hosted iframe behavior...
tomtech’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • 02fc4677 committed on 2.x
    fix: #3592790 Fix double-submission and refactor hosted iframe behavior...

  • 664e9fa1 committed on 1.x
    fix: #3592790 Fix double-submission and refactor hosted iframe behavior...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.