From c0a9f3fe9139ff2ad89fe7ba5253d347f3b074b1 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Fri, 21 Apr 2017 11:29:36 +0100 Subject: 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. --- background_scripts/main.coffee | 2 ++ 1 file changed, 2 insertions(+) (limited to 'background_scripts') 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 -- cgit v1.2.3