FIX: Do not query backend when searching "in this topic" (#14649)
This commit is contained in:
parent
25097fa0af
commit
a1daf9fe53
|
@ -428,7 +428,6 @@ export default createWidget("search-menu", {
|
|||
|
||||
triggerSearch() {
|
||||
searchData.noResults = false;
|
||||
|
||||
if (SearchHelper.includesTopics()) {
|
||||
if (this.state.inTopicContext) {
|
||||
this.searchService().set("highlightTerm", searchData.term);
|
||||
|
@ -438,7 +437,9 @@ export default createWidget("search-menu", {
|
|||
SearchHelper.perform(this);
|
||||
} else {
|
||||
searchData.loading = false;
|
||||
discourseDebounce(SearchHelper, SearchHelper.perform, this, 400);
|
||||
if (!this.state.inTopicContext) {
|
||||
discourseDebounce(SearchHelper, SearchHelper.perform, this, 400);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -36,8 +36,9 @@ $search-pad-horizontal: 0.5em;
|
|||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
.btn.search-context {
|
||||
margin: 2px;
|
||||
margin-right: 0;
|
||||
}
|
||||
&:focus-within {
|
||||
@include default-focus;
|
||||
|
|
Loading…
Reference in New Issue