From a1f8211e5f690e5b3f72b71b52ac8b07e0e5e820 Mon Sep 17 00:00:00 2001 From: AlasdairSwan Date: Fri, 7 Nov 2014 13:42:28 -0500 Subject: [PATCH] Updated so is submission prevented by JS due to errors it scrolls to the error messages --- lms/static/js/student_account/views/FormView.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lms/static/js/student_account/views/FormView.js b/lms/static/js/student_account/views/FormView.js index d603b701a3..4442d1f531 100644 --- a/lms/static/js/student_account/views/FormView.js +++ b/lms/static/js/student_account/views/FormView.js @@ -179,6 +179,11 @@ var edx = edx || {}; $msg.html( html.join('') ); this.element.show( this.$errors ); + + // Scroll to error messages + $('html,body').animate({ + scrollTop: this.$errors.offset().top + },'slow'); }, submitForm: function( event ) {