Permalink
Browse files

Merge pull request #741 from christophermanning/issue-690

Focus window the tab is in when selecting a specific tab.
  • Loading branch information...
2 parents 6eca29f + 04649a5 commit 12e409615a78e23266a89fd46575943b60178763 @int3 int3 committed Dec 16, 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 12e4096

Please sign in to comment.