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