webform submit button is non-responsive for zero-dollar contribution amount
Versions: * Drupal 9 * CiviCRM 5.58.1 * Webform 6.1.3 * Webform CiviCRM 6.2.1 * Stripe 6.8.2 * PaymentShared 1.2.11 Setup: A simple webform (Drupal config export YAML attached as [webform-export.yml](/uploads/ba92781b7ebce9f21a19c99b81de7779/webform-export.yml)), with these configs notable: * One existing contact * Contribution * Processor: Stripe * Amount: a two-option radio button set: * "zero" for $0.00 * "one" for $1.00 * Two webform pages only. All fields are on the first page; only the "Submit button(s)" action is on the second page. Repro 1: Proper behavior for $1.00 amount: 1. Open the form and fill all fields as you wish 2. For the Amount field, select "one" for $1.00 3. Click next; observe second/final page appears. 4. Observe Stripe payment block appears; observe total due is $1.00; fill in credit card details and click _Submit_. 5. Observe SweetAlert "please wait" message. Form is submitted. Observe form redirects correctly and displays confirmation message. 6. Find the contribution record in CiviCRM. Observe that it was recorded properly. Repro 2: Bad behavior for $0.00 amount: 1. Open the form and fill all fields as you wish 2. For the Amount field, select "zero" for $0.00 3. Click next; observe second/final page appears. 4. Observe total due is $0.00; observe Stripe payment block does not appear. Click _Submit_. 5. **Observe no discernable change in the page as a result of the Submit click. (The Submit button appears to be completely non-functional.)** Technical notes: * Inspection of JavaScript in browser devtools reveals that the Submit click proceeds as far as [line 605 of js/civicrmStripe.js](https://lab.civicrm.org/extensions/stripe/-/blob/6.8.2/js/civicrmStripe.js#L605). The stack trace shows that the calling function was [line 438 of the same file](https://lab.civicrm.org/extensions/stripe/-/blob/6.8.2/js/civicrmStripe.js#L438). * Per the JS file, the comment above line 605 says "If we have selected Stripe but amount is 0 we don't submit via Stripe", so this it seems intentional that the Stripe processing should end here; however it's probably not intentional that the entire webform submission ends prematurely as it does. See also: * https://lab.civicrm.org/extensions/stripe/-/issues/383 "Webform won't allow user to submit if total is zero" * This may be the same issue, but that ticket relates to multi-participant event registration and a more complex webform with conditional behaviors. * #383 suggests a possible work-around by moving one or more fields to one of the pages _before_ the last "submit buttons" page; in my case I've made sure there are no field at all on that last page. (Joinery internal reference: Asana 1204591534877896)
issue