Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #741 from christophermanning/issue-690

Focus window the tab is in when selecting a specific tab.
  • Loading branch information...
commit 12e409615a78e23266a89fd46575943b60178763 2 parents 6eca29f + 04649a5
Jez Ng int3 authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 background_scripts/main.coffee
5 background_scripts/main.coffee
View
@@ -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.
Please sign in to comment.
Something went wrong with that request. Please try again.