Skip to content

Commit 0e609f9

Browse files
committed
Rebuild
1 parent faf4c56 commit 0e609f9

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

dist/aspnet-validation.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,12 +599,13 @@ var ValidationService = /** @class */ (function () {
599599
// Because the submitter is not propagated when calling
600600
// form.submit(), we recreate it here.
601601
var submitter = submitEvent.submitter;
602+
var submitterInput = null;
602603
var initialFormAction = form.action;
603604
if (submitter) {
604605
var name_1 = submitter.getAttribute('name');
605606
// If name is null, a submit button is not submitted.
606607
if (name_1) {
607-
var submitterInput = document.createElement('input');
608+
submitterInput = document.createElement('input');
608609
submitterInput.type = 'hidden';
609610
submitterInput.name = name_1;
610611
submitterInput.value = submitter.getAttribute('value');
@@ -619,6 +620,10 @@ var ValidationService = /** @class */ (function () {
619620
form.submit();
620621
}
621622
finally {
623+
if (submitterInput) {
624+
// Important to clean up the submit input we created.
625+
form.removeChild(submitterInput);
626+
}
622627
form.action = initialFormAction;
623628
}
624629
}

0 commit comments

Comments
 (0)