[devdocsgjs/main: 510/1867] Fix single documentation search on Android
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 510/1867] Fix single documentation search on Android
- Date: Fri, 19 Nov 2021 23:47:15 +0000 (UTC)
commit 504f95e4f4d0aaf16c2d4c49c50c477910cd3c6b
Author: Jasper van Merle <jaspervmerle gmail com>
Date: Sun Nov 25 00:28:36 2018 +0100
Fix single documentation search on Android
assets/javascripts/views/search/search_scope.coffee | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/assets/javascripts/views/search/search_scope.coffee
b/assets/javascripts/views/search/search_scope.coffee
index 24de57ce..9be90dd2 100644
--- a/assets/javascripts/views/search/search_scope.coffee
+++ b/assets/javascripts/views/search/search_scope.coffee
@@ -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}="
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]