From cb6d1632baebea11715e9c5c96fb84193ea72003 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 12 Apr 2016 10:48:17 +1000 Subject: [PATCH] FIX: stop suppressing browser search for short closed topics If a topic is closed (or closed and reopened) browser search was unconditionally suppressed --- app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 b/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 index bf66dbfc1c9..748099a740f 100644 --- a/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 +++ b/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 @@ -158,7 +158,7 @@ export default { // If we're viewing a topic, only intercept search if there are cloaked posts if (showSearch && currentPath.match(/^topic\./)) { - showSearch = $('.cooked').length < this.container.lookup('controller:topic').get('model.postStream.stream.length'); + showSearch = $('.topic-post .cooked, .small-action:not(.time-gap)').length < this.container.lookup('controller:topic').get('model.postStream.stream.length'); } if (showSearch) {