Skip to content

Commit

Permalink
netteForms: do not propagate 'submit' event further when the form is …
Browse files Browse the repository at this point in the history
…invalid
  • Loading branch information
jiripudil committed Dec 17, 2024
1 parent e499e54 commit f4fb344
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/assets/formValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ export class FormValidator {

form.addEventListener('submit', (e) => {
if (!this.validateForm((e.submitter || form) as HTMLFormElement | FormElement)) {
e.stopPropagation();
e.stopImmediatePropagation();
e.preventDefault();
}
});
Expand Down

0 comments on commit f4fb344

Please sign in to comment.