From 85aa77ce1daec7bd1452cd7813a0d5d408729408 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Mon, 4 May 2015 09:54:36 +0100 Subject: Search completion; prevent vomnibar flicker. --- background_scripts/completion.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index 37e9ea6b..a75cf6b5 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -469,7 +469,11 @@ class MultiCompleter continuation = cont if cont? if @completers.length <= ++completersFinished shouldRunContinuation = continuation? and not @mostRecentQuery - onComplete @prepareSuggestions(queryTerms, suggestions), keepAlive: shouldRunContinuation + # We don't post results immediately if there are none, and we're going to run a continuation + # (ie. a SearchEngineCompleter). This prevents hiding the vomnibar briefly before showing it + # again, which looks ugly. + unless shouldRunContinuation and suggestions.length == 0 + onComplete @prepareSuggestions(queryTerms, suggestions), keepAlive: shouldRunContinuation # Allow subsequent queries to begin. @filterInProgress = false if shouldRunContinuation -- cgit v1.2.3