2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 20:16:44 +00:00
This commit is contained in:
Oliver 2021-08-14 13:43:38 +10:00
parent 32fafc76d7
commit 28bccea57b

View File

@ -899,8 +899,6 @@ function handleFormErrors(errors, fields, options) {
}
}
var offset = 0;
if (first_error_field) {
// Ensure that the field in question is visible
document.querySelector(`#div_id_${field_name}`).scrollIntoView({
@ -908,7 +906,7 @@ function handleFormErrors(errors, fields, options) {
});
} else {
// Scroll to the top of the form
$(options.modal).find('.modal-form-content-wrapper').scrollTop(offset);
$(options.modal).find('.modal-form-content-wrapper').scrollTop(0);
}
$(options.modal).find('.modal-content').addClass('modal-error');