Unified · Split
| @@ -14,7 +14,7 @@ class app.views.Search extends app.View · 13 unmodified lines | |||
| 14 | submit: 'onSubmit' | 14 | submit: 'onSubmit' |
| 15 | 15 | ||
| 16 | @shortcuts: | 16 | @shortcuts: |
| 17 | typing: 'autoFocus' | 17 | typing: 'focus' |
| 18 | altG: 'google' | 18 | altG: 'google' |
| 19 | altS: 'stackoverflow' | 19 | altS: 'stackoverflow' |
| 20 | 20 | ||
| @@ -34,9 +34,8 @@ class app.views.Search extends app.View · 13 unmodified lines | |||
| 34 | $.on window, 'focus', @autoFocus | 34 | $.on window, 'focus', @autoFocus |
| 35 | return | 35 | return |
| 36 | 36 | ||
| 37 | focus: -> | 37 | focus: => |
| 38 | @delay => | 38 | @input.focus() unless document.activeElement is @input |
| 39 | @input.focus() unless document.activeElement is @input | ||
| 40 | return | 39 | return |
| 41 | 40 | ||
| 42 | autoFocus: => | 41 | autoFocus: => |