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.
Issue fork commerce_cardpointe-3592790
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
Comment #4
tomtech commented