aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2017-04-21 11:29:36 +0100
committerStephen Blott2017-04-21 11:29:36 +0100
commitc0a9f3fe9139ff2ad89fe7ba5253d347f3b074b1 (patch)
treee7c01b33835da008c149585e53ee29bced7559c0
parentf5007e2f69cfcf87c44d1eb34532bc1d3c2f591b (diff)
downloadvimium-c0a9f3fe9139ff2ad89fe7ba5253d347f3b074b1.tar.bz2
Firefox: Fix createTab.
Firefox baulks at "about:newtab" in createTab (but seems happy with no URL specified). Chrome is also happy with no URL specified. (Does this mean that we don't need "about:newtab" ANYWHERE in the code base? Could Settings.defaults.newTabUrl just be ""?) Mention @mrmr1993.
-rw-r--r--background_scripts/main.coffee2
1 files changed, 2 insertions, 0 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index 4fb754f8..6c9fbc98 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -101,6 +101,8 @@ TabOperations =
index: request.tab.index + 1
active: true
windowId: request.tab.windowId
+ # Firefox does not support "about:newtab" in chrome.tabs.create.
+ delete tabConfig["url"] if tabConfig["url"] == Settings.defaults.newTabUrl
chrome.tabs.create tabConfig, (tab) ->
# NOTE(mrmr1993, 2017-02-08): Firefox currently doesn't support openerTabId (issue 1238314) and throws
# a type error if it is present. We work around this by attempting to set it separately from creating