@@ -, +, @@ field, on saving, the invalidFocus should show the focused field clearly in view This patch will center the focused field at the golden section in the window. To test: 1) Begin to add a new patron. 2) Leave a required field empty, which is outside the screen view, and click Save. 3) Notice that the field is at the bottom, behind the language bar if there is one. 4) Apply patch 5) Add a new patron. 6) Leave the required field empty again and Save. 7) Notice that the required field is now clearly shown in view. 8) Sign off. --- koha-tmpl/intranet-tmpl/prog/js/members.js | 11 +++++++++++ 1 file changed, 11 insertions(+) --- a/koha-tmpl/intranet-tmpl/prog/js/members.js +++ a/koha-tmpl/intranet-tmpl/prog/js/members.js @@ -326,6 +326,17 @@ $(document).ready(function(){ jQuery.validator.messages.phone); $("#entryform").validate({ + focusInvalid: false, + invalidHandler: function(form, validator) { + var errors = validator.numberOfInvalids(); + if(errors) { + window.scrollTo(0, 0); + validator.errorList[0].element.focus(); + if($(validator.errorList[0].element).offset().top > $(window).height()) { + window.scrollBy(0,$(window).height()/1.618); + } + } + }, rules: { email: { email: true --