From 3cd537300d27da7f9572d98dc1495e8ef5b93199 Mon Sep 17 00:00:00 2001 From: Thibaut Date: Sat, 21 Dec 2013 13:50:28 +0000 Subject: [PATCH] Reset search input after revealing result in the sidebar list --- assets/javascripts/views/search/search.coffee | 3 +-- assets/javascripts/views/sidebar/sidebar.coffee | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/views/search/search.coffee b/assets/javascripts/views/search/search.coffee index 74e8e139..d9ce6268 100644 --- a/assets/javascripts/views/search/search.coffee +++ b/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() diff --git a/assets/javascripts/views/sidebar/sidebar.coffee b/assets/javascripts/views/sidebar/sidebar.coffee index 0bce250a..f731e4ce 100644 --- a/assets/javascripts/views/sidebar/sidebar.coffee +++ b/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: =>