Skip to content

Commit

Permalink
fix(form): reset submitting flag when validation fails to keep dirtyc…
Browse files Browse the repository at this point in the history
…heck

When the preventLeaving feature is used, the dirtycheck was ignored on a submit even when the validation failed (which aborts the submit).
Whenever a validation failes it should therefore also reset a possible existing submitting flag to keep the preventLeavin feature working
  • Loading branch information
lubber-de authored Aug 3, 2020
1 parent 182dd81 commit e2d70af
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/definitions/behaviors/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -1192,6 +1192,7 @@ $.fn.form = function(parameters) {
}
else {
module.debug('Form has errors');
submitting = false;
module.set.error();
if(!settings.inline) {
module.add.errors(formErrors);
Expand Down

0 comments on commit e2d70af

Please sign in to comment.