aboutsummaryrefslogtreecommitdiffstats
path: root/pages
diff options
context:
space:
mode:
authorStephen Blott2015-03-05 15:14:01 +0000
committerStephen Blott2015-03-05 15:14:01 +0000
commit8099d5d57f885517c4d5e04cdcc74c91980a75fb (patch)
tree350b2ce99b6b76584d711fff88069941afe2cb09 /pages
parentc2638cd00b19e04bdfed164de6b1a3d4051cfbd9 (diff)
downloadvimium-8099d5d57f885517c4d5e04cdcc74c91980a75fb.tar.bz2
Hide vomnibar if host frame regains focus.
Fixes #1506. This takes the opposite approach to #1511. Instead of hiding the vomnibar when it blurs, we hide it when it's host frame is focused.
Diffstat (limited to 'pages')
-rw-r--r--pages/vomnibar.coffee5
1 files changed, 4 insertions, 1 deletions
diff --git a/pages/vomnibar.coffee b/pages/vomnibar.coffee
index 18a72a37..255dd893 100644
--- a/pages/vomnibar.coffee
+++ b/pages/vomnibar.coffee
@@ -38,6 +38,8 @@ Vomnibar =
@vomnibarUI.setQuery(options.query)
@vomnibarUI.update()
+ hide: -> @vomnibarUI?.hide()
+
class VomnibarUI
constructor: ->
@refreshInterval = 0
@@ -225,7 +227,8 @@ extend BackgroundCompleter,
switchToTab: (tabId) -> chrome.runtime.sendMessage({ handler: "selectSpecificTab", id: tabId })
-UIComponentServer.registerHandler (event) -> Vomnibar.activate event.data
+UIComponentServer.registerHandler (event) ->
+ if event.data == "hide" then Vomnibar.hide() else Vomnibar.activate event.data
root = exports ? window
root.Vomnibar = Vomnibar