From 7b7f94d7df25f8e6040746a33e0ab430fcd78836 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 12 Feb 2018 13:09:56 -0500 Subject: [PATCH] FIX: Using cmd-f to search in a topic wasn't restricting to that topic --- app/assets/javascripts/discourse/widgets/header.js.es6 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/widgets/header.js.es6 b/app/assets/javascripts/discourse/widgets/header.js.es6 index 0cfc0419148..12cd200c324 100644 --- a/app/assets/javascripts/discourse/widgets/header.js.es6 +++ b/app/assets/javascripts/discourse/widgets/header.js.es6 @@ -230,7 +230,11 @@ export default createWidget('header', { if (state.searchVisible) { const contextType = this.searchContextType(); - if (state.searchContextType !== contextType) { + if (!contextType) { + state.contextEnabled = undefined; + } + + if (state.searchContextType && state.searchContextType !== contextType) { state.contextEnabled = undefined; state.searchContextType = contextType; }