Bind multiple events to single callback

This commit is contained in:
Kevin Sawicki 2013-05-06 10:02:38 -07:00
parent 4527d8bd51
commit e2af4c964d

View File

@ -44,10 +44,7 @@ class SignInView extends ScrollView
@cancel.on 'click', => @detach()
@on 'core:cancel', => @detach()
@subscribe $(document.body), 'click', (e) =>
@detach() unless $.contains(this[0], e.target)
@subscribe $(document.body), 'focusin', (e) =>
@subscribe $(document.body), 'click focusin', (e) =>
@detach() unless $.contains(this[0], e.target)
validate: ->