Permalink
Browse files

Focus window the tab is in when selecting a specific tab

  • Loading branch information...
1 parent 846cc9f commit 04649a5a7f9bd664fa7fc66c06650c143628394c @christophermanning committed Dec 7, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 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.

0 comments on commit 04649a5

Please sign in to comment.