[devdocsgjs/main: 527/1867] Simplify re-triggering search after scope change
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 527/1867] Simplify re-triggering search after scope change
- Date: Fri, 19 Nov 2021 23:47:15 +0000 (UTC)
commit c27868debc9d7baf48f97b8ecc9bb555d8083467
Author: Jasper van Merle <jaspervmerle gmail com>
Date: Mon Dec 3 23:00:06 2018 +0100
Simplify re-triggering search after scope change
assets/javascripts/views/search/search.coffee | 1 +
assets/javascripts/views/search/search_scope.coffee | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/assets/javascripts/views/search/search.coffee b/assets/javascripts/views/search/search.coffee
index ad5b6a0c..7d05f0a0 100644
--- a/assets/javascripts/views/search/search.coffee
+++ b/assets/javascripts/views/search/search.coffee
@@ -143,6 +143,7 @@ class app.views.Search extends app.View
onScopeChange: =>
@value = ''
+ @onInput()
return
afterRoute: (name, context) =>
diff --git a/assets/javascripts/views/search/search_scope.coffee
b/assets/javascripts/views/search/search_scope.coffee
index 8ad033ec..4a43f641 100644
--- a/assets/javascripts/views/search/search_scope.coffee
+++ b/assets/javascripts/views/search/search_scope.coffee
@@ -91,7 +91,6 @@ class app.views.SearchScope extends app.View
onClick: (event) =>
if event.target is @tag
@reset()
- $.trigger @input, 'input'
$.stopEvent(event)
return
@@ -99,7 +98,6 @@ class app.views.SearchScope extends app.View
if event.which is 8 # backspace
if @doc and @input.selectionEnd is 0
@reset()
- $.trigger @input, 'input'
$.stopEvent(event)
else if not @doc and @input.value
return if event.ctrlKey or event.metaKey or event.altKey or event.shiftKey
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]