diff --git a/app/views/courses/StudentLogInModal.coffee b/app/views/courses/StudentLogInModal.coffee index cad9e3a57..5baf986f6 100644 --- a/app/views/courses/StudentLogInModal.coffee +++ b/app/views/courses/StudentLogInModal.coffee @@ -35,4 +35,8 @@ module.exports = class StudentSignInModal extends ModalView onClickCreateNewAccountLink: -> @trigger 'want-to-create-account' - @hide?() \ No newline at end of file + @hide?() + + afterInsert: -> + super() + _.delay (=> @$('input:visible:first').focus()), 500 \ No newline at end of file diff --git a/app/views/courses/StudentSignUpModal.coffee b/app/views/courses/StudentSignUpModal.coffee index 6a45882b4..0c25cb030 100644 --- a/app/views/courses/StudentSignUpModal.coffee +++ b/app/views/courses/StudentSignUpModal.coffee @@ -20,6 +20,10 @@ module.exports = class StudentSignUpModal extends ModalView @willPlay = options.willPlay @classCode = utils.getQueryVariable('_cc') or '' + afterInsert: -> + super() + _.delay (=> @$('input:visible:first').focus()), 500 + onClickSkipLink: -> @trigger 'click-skip-link' # defer to view that opened this modal @hide?()