Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netteForms: do not propagate 'submit' event further when the form is invalid #342

Merged
merged 1 commit into from
Dec 27, 2024

Conversation

jiripudil
Copy link
Contributor

  • bug fix
  • BC break? no
  • doc PR: is it necessary?

As reported in https://forum.nette.org/cs/36618-duplicitni-dialog-netteformsmodal-s-ajaxem-naja-js, when somebody uses netteForms and Naja (>= 3.2) together, and netteForms are loaded (and auto-initialized) before Naja, both libraries consecutively trigger the form validation, which results in duplicate dialogs when there are validation errors.

This change prevents the submit event from propagating even to other listeners attached to the same form and event.

@dg dg merged commit 692452a into nette:master Dec 27, 2024
10 of 12 checks passed
@jiripudil jiripudil deleted the do-not-propagate-submit branch December 27, 2024 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants