Skip to content

Focus window the tab is in when selecting a specific tab #741

Merged
merged 1 commit into from Dec 16, 2012
View
5 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.
Something went wrong with that request. Please try again.