diff options
| author | Jez Ng | 2012-12-16 12:01:09 -0800 |
|---|---|---|
| committer | Jez Ng | 2012-12-16 12:01:09 -0800 |
| commit | 12e409615a78e23266a89fd46575943b60178763 (patch) | |
| tree | 8a2a6da40910580434a2800d0a33cde2b6b36167 /background_scripts | |
| parent | 6eca29f7a6b10b923bedd10fedb1cf4a032b0392 (diff) | |
| parent | 04649a5a7f9bd664fa7fc66c06650c143628394c (diff) | |
| download | vimium-12e409615a78e23266a89fd46575943b60178763.tar.bz2 | |
Merge pull request #741 from christophermanning/issue-690
Focus window the tab is in when selecting a specific tab.
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/main.coffee | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 3d3a59a6..d9229f12 100644 --- a/background_scripts/main.coffee +++ b/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. |
