From 04649a5a7f9bd664fa7fc66c06650c143628394c Mon Sep 17 00:00:00 2001 From: Christopher Manning Date: Fri, 7 Dec 2012 02:05:10 -0600 Subject: Focus window the tab is in when selecting a specific tab --- background_scripts/main.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'background_scripts') 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. -- cgit v1.2.3