Skip to content

Commit

Permalink
Focus window the tab is in when selecting a specific tab
Browse files Browse the repository at this point in the history
  • Loading branch information
christophermanning committed Dec 7, 2012
1 parent 846cc9f commit 04649a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion background_scripts/main.coffee
Expand Up @@ -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.
Expand Down

0 comments on commit 04649a5

Please sign in to comment.