Fix single documentation search on Android

pull/941/head
Jasper van Merle 6 years ago
parent 3a8be5050b
commit 504f95e4f4

@ -7,6 +7,7 @@ class app.views.SearchScope extends app.View
@events:
keydown: 'onKeydown'
textInput: 'onTextInput'
@routes:
after: 'afterRoute'
@ -100,6 +101,12 @@ class app.views.SearchScope extends app.View
$.stopEvent(event) if @doc
return
onTextInput: (event) =>
if event.data == ' ' and app.isMobile()
@search @input.value[0...@input.selectionStart]
$.stopEvent(event) if @doc
return
extractHashValue: ->
if value = @getHashValue()
newHash = $.urlDecode(location.hash).replace "##{SEARCH_PARAM}=#{value} ", "##{SEARCH_PARAM}="

Loading…
Cancel
Save