Fix #13920: Fixed erroneous validation for specific cases

This commit is contained in:
Tim Fischer
2023-07-24 15:01:57 +02:00
parent c8c0ea97c4
commit 2152c00edb
2 changed files with 9 additions and 0 deletions

View File

@ -395,9 +395,11 @@
data: $form.serialize() + extData,
dataType: data.settings.ajaxDataType,
complete: function (jqXHR, textStatus) {
currentAjaxRequest = null;
$form.trigger(events.ajaxComplete, [jqXHR, textStatus]);
},
beforeSend: function (jqXHR, settings) {
currentAjaxRequest = jqXHR;
$form.trigger(events.ajaxBeforeSend, [jqXHR, settings]);
},
success: function (msgs) {
@ -563,6 +565,9 @@
return;
}
if (currentAjaxRequest !== null) {
currentAjaxRequest.abort();
}
if (data.settings.timer !== undefined) {
clearTimeout(data.settings.timer);
}
@ -929,4 +934,7 @@
$form.find(attribute.input).attr('aria-invalid', hasError ? 'true' : 'false');
}
}
var currentAjaxRequest = null;
})(window.jQuery);