[Koha-bugs] [Bug 25680] When adding a new patron and missing to fill a field, on saving, the invalidFocus should show the focused field clearly in view.
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Jun 5 11:38:25 CEST 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25680
--- Comment #1 from Timothy Alexis Vass <timothy_alexis.vass at ub.lu.se> ---
$("#entryform").validate({
focusInvalid: false,
invalidHandler: function(form, validator) {
var errors = validator.numberOfInvalids();
if (errors) {
window.scrollTo(0, 0);
validator.errorList[0].element.focus();
window.scrollBy(0,$(window).height()/1.618);
}
},
This will set the element at the "golden section" in the window.
Can anyone think of a simpler way to do it?
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list