From d9a12a595ca5852432468019f2224588118487a8 Mon Sep 17 00:00:00 2001 From: Thibaut Courouble Date: Sat, 20 Aug 2016 15:30:00 -0400 Subject: [PATCH] Clear the search scope on ctrl/cmd/alt + backspace --- assets/javascripts/views/search/search_scope.coffee | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/assets/javascripts/views/search/search_scope.coffee b/assets/javascripts/views/search/search_scope.coffee index f5d3f8dc..c7a142ae 100644 --- a/assets/javascripts/views/search/search_scope.coffee +++ b/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]