Skip to content

Proposed fix for #428: webform submit button is non-responsive for zero-dollar contribution amount.

This PR does solve the problem in #428, but frankly I would be surprised if this is a complete fix as it's admittedly naive.

I found that by commenting out the event.preventDefault() call at the top of script.submit(), the problem in #428 goes away. Apparently that's what is interrupting the submit when script.submit() returns at line 605.

Of course, that change would seem a little blunt. Surely there are some cases where it is still appropriate to preventDefault().

Instead, this PR adds preventDefault() in script.submit() only where that function returns false. My assumption here is that there once was (or somewhere still is) a meaningful distinction between return;, return false; and return true;, and that maybe that disctinction relates to whether or not to allow the event to continue processing.

Merge request reports

Loading