From 4aa8d7fb21a26b0766ce32e3fab0cf1efcaa07fb Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Thu, 14 Dec 2017 07:22:05 +0000 Subject: Fix createTab. Specifically, fix createTab with multiple URLs specified. Fixes #2868. --- background_scripts/main.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index e3188a26..594b80ee 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -114,7 +114,8 @@ TabOperations = canUseOpenerTabId = not (Utils.isFirefox() and Utils.compareVersions(Utils.firefoxVersion(), "57") < 0) tabConfig.openerTabId = request.tab.id if canUseOpenerTabId - chrome.tabs.create tabConfig, -> callback request + chrome.tabs.create tabConfig, (tab) -> + callback extend request, {tab, tabId: tab.id} # Opens request.url in new window and switches to it. openUrlInNewWindow: (request, callback = (->)) -> @@ -198,8 +199,7 @@ BackgroundCommands = urls = request.urls[..].reverse() do openNextUrl = (request) -> if 0 < urls.length - TabOperations.openUrlInNewTab (extend request, {url: urls.pop()}), (tab) -> - openNextUrl extend request, {tab, tabId: tab.id} + TabOperations.openUrlInNewTab (extend request, {url: urls.pop()}), openNextUrl else callback request duplicateTab: mkRepeatCommand (request, callback) -> -- cgit v1.2.3