Skip to content

Commit

Permalink
Rebuild scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
haacked committed Jul 3, 2023
1 parent cd5e2c6 commit e4df6f6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
14 changes: 14 additions & 0 deletions dist/aspnet-validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,20 @@ var ValidationService = /** @class */ (function () {
this.submitValidForm = function (form, submitEvent) {
var newEvent = new SubmitEvent('submit', submitEvent);
if (form.dispatchEvent(newEvent)) {
// Because the submitter is not propagated when calling
// form.submit(), we recreate it here.
var submitter = submitEvent.submitter;
if (submitter) {
var name_1 = submitter.getAttribute('name');
// If name is null, a submit button is not submitted.
if (name_1) {
var submitterInput = document.createElement('input');
submitterInput.type = 'hidden';
submitterInput.name = name_1;
submitterInput.value = submitter.getAttribute('value');
form.appendChild(submitterInput);
}
}
form.submit();
}
};
Expand Down
Loading

0 comments on commit e4df6f6

Please sign in to comment.