Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion nette.ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,9 @@ $.nette.ext('validation', {
var ie = this.ie();
notValid = (analyze.form.get(0).onsubmit && analyze.form.get(0).onsubmit((typeof ie !== 'undefined' && ie < 9) ? undefined : e) === false);
} else { // Nette 2.4 and up
notValid = ((analyze.form.get(0).onsubmit ? analyze.form.triggerHandler('submit') : Nette.validateForm(analyze.form.get(0))) === false)
const formEl = analyze.form.get(0);
const submitter = formEl["nette-submittedBy"] || formEl;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nette-submittedBy is not set in latest Nette forms version.
const submitter = analyze.el.get(0) || formEl["nette-submittedBy"] || formEl;

notValid = ((formEl.onsubmit ? analyze.form.triggerHandler('submit') : Nette.validateForm(submitter)) === false);
}
if (notValid) {
e.stopImmediatePropagation();
Expand Down