mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 05:53:39 -04:00
Have Student login/signup modals automatically focus first inputs
This commit is contained in:
parent
d874569b27
commit
52cb638a6c
2 changed files with 9 additions and 1 deletions
app/views/courses
|
@ -35,4 +35,8 @@ module.exports = class StudentSignInModal extends ModalView
|
|||
|
||||
onClickCreateNewAccountLink: ->
|
||||
@trigger 'want-to-create-account'
|
||||
@hide?()
|
||||
@hide?()
|
||||
|
||||
afterInsert: ->
|
||||
super()
|
||||
_.delay (=> @$('input:visible:first').focus()), 500
|
|
@ -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?()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue