aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2017-12-14 07:22:05 +0000
committerStephen Blott2017-12-14 07:23:57 +0000
commit4aa8d7fb21a26b0766ce32e3fab0cf1efcaa07fb (patch)
tree8e3b078b833624633a3f8a70b4b700d87b04df38
parent1e828ab451be7d8e0129f3d9d4eb5768b1a48c99 (diff)
downloadvimium-4aa8d7fb21a26b0766ce32e3fab0cf1efcaa07fb.tar.bz2
Fix createTab.
Specifically, fix createTab with multiple URLs specified. Fixes #2868.
-rw-r--r--background_scripts/main.coffee6
1 files 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) ->