Browse Source

Reset search input after revealing result in the sidebar list

Thibaut 12 years ago
parent
commit
3cd537300d

+ 1 - 2
assets/javascripts/views/search/search.coffee

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

+ 3 - 1
assets/javascripts/views/sidebar/sidebar.coffee

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