mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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() {
|
triggerSearch() {
|
||||||
searchData.noResults = false;
|
searchData.noResults = false;
|
||||||
|
|
||||||
if (SearchHelper.includesTopics()) {
|
if (SearchHelper.includesTopics()) {
|
||||||
if (this.state.inTopicContext) {
|
if (this.state.inTopicContext) {
|
||||||
this.searchService().set("highlightTerm", searchData.term);
|
this.searchService().set("highlightTerm", searchData.term);
|
||||||
@ -438,7 +437,9 @@ export default createWidget("search-menu", {
|
|||||||
SearchHelper.perform(this);
|
SearchHelper.perform(this);
|
||||||
} else {
|
} else {
|
||||||
searchData.loading = false;
|
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: 2px;
|
||||||
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
&:focus-within {
|
&:focus-within {
|
||||||
@include default-focus;
|
@include default-focus;
|
||||||
|
Loading…
Reference in New Issue
Block a user