Skip to content

Commit

Permalink
fixup! Build 0.8.14
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlbyk committed Jul 30, 2023
1 parent 08a2f9e commit 6c4ed02
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 21 deletions.
43 changes: 24 additions & 19 deletions dist/aspnet-validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -859,27 +859,32 @@ var ValidationService = /** @class */ (function () {
}
validating = true;
_this.logger.log('Validating', form);
validate.then(function (success) {
_this.logger.log('Validated (success = %s)', success, form);
if (callback) {
callback(success);
return;
}
var validationEvent = new CustomEvent('validation', {
detail: { valid: success }
});
form.dispatchEvent(validationEvent);
// Firefox fix: redispatch 'submit' after finished handling this event
setTimeout(function () {
try {
_this.handleValidated(form, success, e);
validate.then(function (success) { return __awaiter(_this, void 0, void 0, function () {
var validationEvent;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
this.logger.log('Validated (success = %s)', success, form);
if (callback) {
callback(success);
return [2 /*return*/];
}
validationEvent = new CustomEvent('validation', {
detail: { valid: success }
});
form.dispatchEvent(validationEvent);
// Firefox fix: redispatch 'submit' after finished handling this event
return [4 /*yield*/, new Promise(function (resolve) { setTimeout(resolve, 0); })];
case 1:
// Firefox fix: redispatch 'submit' after finished handling this event
_a.sent();
this.handleValidated(form, success, e);
return [2 /*return*/];
}
finally {
validating = false;
}
}, 0);
}).catch(function (error) {
});
}); }).catch(function (error) {
_this.logger.log('Validation error', error);
}).finally(function () {
validating = false;
});
};
Expand Down
Loading

0 comments on commit 6c4ed02

Please sign in to comment.