Skip to content

A platform for community discussion. Free, open, simple.

FIX: Don't auto select ALL topics, only keyboard chosen ones

Robin Wardd962d6072e24
diff --git a/app/assets/javascripts/discourse/widgets/header.js.es6 b/app/assets/javascripts/discourse/widgets/header.js.es6
index 12cd200c324..04fdd8902a6 100644
--- a/app/assets/javascripts/discourse/widgets/header.js.es6
+++ b/app/assets/javascripts/discourse/widgets/header.js.es6
@@ -230,11 +230,7 @@ export default createWidget('header', {
if (state.searchVisible) {
const contextType = this.searchContextType();
- if (!contextType) {
- state.contextEnabled = undefined;
- }
-
- if (state.searchContextType && state.searchContextType !== contextType) {
+ if (state.searchContextType !== contextType) {
state.contextEnabled = undefined;
state.searchContextType = contextType;
}
@@ -407,6 +403,10 @@ export default createWidget('header', {
this.toggleHamburger();
break;
case 'page-search':
+ let contextType = this.searchContextType();
+ if (contextType === 'topic') {
+ this.state.searchContextType = contextType;
+ }
if (!this.togglePageSearch()) {
msg.event.preventDefault();
msg.event.stopPropagation();