Reset search input after revealing result in the sidebar list

pull/33/head
Thibaut 11 years ago
parent 895260a389
commit 3cd537300d

@ -15,7 +15,6 @@ class app.views.Search extends app.View
@shortcuts: @shortcuts:
typing: 'autoFocus' typing: 'autoFocus'
escape: 'reset'
@routes: @routes:
root: 'onRoot' root: 'onRoot'
@ -40,7 +39,7 @@ class app.views.Search extends app.View
@focus() unless $.isTouchScreen() @focus() unless $.isTouchScreen()
return return
reset: => reset: ->
@el.reset() @el.reset()
@onInput() @onInput()
@autoFocus() @autoFocus()

@ -37,7 +37,9 @@ class app.views.Sidebar extends app.View
showDocList: (reset) => showDocList: (reset) =>
@show @docList @show @docList
@docList.reset() if reset is true if reset is true
@docList.reset()
@search.reset()
return return
showDocPicker: => showDocPicker: =>

Loading…
Cancel
Save