Browse Source

Clear the search scope on ctrl/cmd/alt + backspace

Thibaut Courouble 9 years ago
parent
commit
d9a12a595c
1 changed files with 1 additions and 2 deletions
  1. 1 2
      assets/javascripts/views/search/search_scope.coffee

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

@@ -88,13 +88,12 @@ class app.views.SearchScope extends app.View
     return
 
   onKeydown: (event) =>
-    return if event.ctrlKey or event.metaKey or event.altKey or event.shiftKey
-
     if event.which is 8 # backspace
       if @doc and not @input.value
         $.stopEvent(event)
         @reset()
     else if not @doc and @input.value
+      return if event.ctrlKey or event.metaKey or event.altKey or event.shiftKey
       if event.which is 9 or # tab
          event.which is 32 and (app.isMobile() or $.isTouchScreen()) # space
         @search @input.value[0...@input.selectionStart]