From 09f25bb9622675b270d395b5ad7e6d5e466af556 Mon Sep 17 00:00:00 2001 From: Piro / YUKI Hiroshi Date: Thu, 8 Sep 2016 23:51:35 +0900 Subject: [PATCH] Initialize the browser window correctly with the preference browser.tabs.drawInTitlebar=false See: https://github.com/piroor/treestyletab/issues/1183 --- content/treestyletab/windowHelper.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/treestyletab/windowHelper.js b/content/treestyletab/windowHelper.js index 7b4a9438..d99a25b9 100644 --- a/content/treestyletab/windowHelper.js +++ b/content/treestyletab/windowHelper.js @@ -47,7 +47,8 @@ var TreeStyleTabWindowHelper = { TabsInTitlebar._update = function(...aArgs) { // See: https://dxr.mozilla.org/mozilla-central/rev/dbe4b47941c7b3d6298a0ead5e40dd828096c808/browser/base/content/browser-tabsintitlebar.js#104 let result = this.__treestyletab__update(...aArgs); - if (gBrowser.treeStyleTab.position != 'top') + if (gBrowser.treeStyleTab && // possibly not available while the startup process + gBrowser.treeStyleTab.position != 'top') document.getElementById('titlebar').style.marginBottom = document.getElementById('titlebar-content').style.marginBottom = ''; return result;