aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts
diff options
context:
space:
mode:
authorChristopher Manning2012-12-07 02:05:10 -0600
committerChristopher Manning2012-12-07 02:10:53 -0600
commit04649a5a7f9bd664fa7fc66c06650c143628394c (patch)
tree11e1191e9a35214d5cb35521f46e2797ad8f0324 /background_scripts
parent846cc9f542e24fdc08e73e1a45973dd11d62cb53 (diff)
downloadvimium-04649a5a7f9bd664fa7fc66c06650c143628394c.tar.bz2
Focus window the tab is in when selecting a specific tab
Diffstat (limited to 'background_scripts')
-rw-r--r--background_scripts/main.coffee5
1 files changed, 4 insertions, 1 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index 3d3a59a6..d9229f12 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -178,7 +178,10 @@ copyToClipboard = (request) -> Clipboard.copy(request.data)
#
# Selects the tab with the ID specified in request.id
#
-selectSpecificTab = (request) -> chrome.tabs.update(request.id, { selected: true })
+selectSpecificTab = (request) ->
+ chrome.tabs.get(request.id, (tab) ->
+ chrome.windows.update(tab.windowId, { focused: true })
+ chrome.tabs.update(request.id, { selected: true }))
#
# Used by the content scripts to get settings from the local storage.