Voting starts in March for the Drupal Association Board election.
Description of bug: A submit form element with a #ajax handler should handle the entire submit action without a page reload. It sometimes/often does not.
What happens: Set a form element to have a #ajax. Press the submit button. Always the #ajax action fires and what happens should happen. SOMETIMES the form then submits after that, and the page reloads.
What I expect: The #ajax handler should handle everything about the form submission, and the form should not manually submit, nor should the page reload.
This bug exists in D6 and D7, using Firefox and several versions of IE.
@aidan suggests the use of
@effulgentsia says "the problem is the onSubmit() handler needs to return FALSE to prevent the browser from doing what it normally does on a submit event. but, for some weird reason, it apparently needs to do it fast enough. for example, if you stick in an "alert" in the onSubmit() handler, or even a breakpoint, then you can't stop the form from submitting."
PASSED: [[SimpleTest]]: [MySQL] 33,530 pass(es). View
PASSED: [[SimpleTest]]: [MySQL] 32,790 pass(es). View
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch forms_api-ajax_prevent-634616-79.patch. View
PASSED: [[SimpleTest]]: [MySQL] 30,043 pass(es). View