Skip to content

Commit d9a12a5

Browse files
committed
Clear the search scope on ctrl/cmd/alt + backspace
1 parent c63be68 commit d9a12a5

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

assets/javascripts/views/search/search_scope.coffee

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,12 @@ class app.views.SearchScope extends app.View
8888
return
8989

9090
onKeydown: (event) =>
91-
return if event.ctrlKey or event.metaKey or event.altKey or event.shiftKey
92-
9391
if event.which is 8 # backspace
9492
if @doc and not @input.value
9593
$.stopEvent(event)
9694
@reset()
9795
else if not @doc and @input.value
96+
return if event.ctrlKey or event.metaKey or event.altKey or event.shiftKey
9897
if event.which is 9 or # tab
9998
event.which is 32 and (app.isMobile() or $.isTouchScreen()) # space
10099
@search @input.value[0...@input.selectionStart]

0 commit comments

Comments
 (0)