From e80ffd1b110420228f7d38c96bdd78c6038ebad8 Mon Sep 17 00:00:00 2001 From: Piro / YUKI Hiroshi Date: Wed, 4 Mar 2015 01:45:09 +0900 Subject: [PATCH] Save position safely --- modules/browser.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/browser.js b/modules/browser.js index a07eee0d..3dcac8fc 100644 --- a/modules/browser.js +++ b/modules/browser.js @@ -1346,20 +1346,20 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, { this._startListenTabbarEvents(); this.window.TreeStyleTabWindowHelper.initTabbarMethods(b); - if (!aIsTemporaryChange) { - let positionName = this.normalizeTabbarPosition(aNewPosition); - this.setWindowValue(this.kTABBAR_POSITION, positionName); - this.setPrefForActiveWindow(function() { - utils.setTreePref('tabbar.position', positionName); - }); - } - var pos = aNewPosition || this.getPositionFlag(this.position); if (b.getAttribute('id') != 'content' && !utils.getTreePref('tabbar.position.subbrowser.enabled')) { pos = this.kTABBAR_TOP; } + if (!aIsTemporaryChange) { + let positionName = this.normalizeTabbarPosition(pos); + this.setWindowValue(this.kTABBAR_POSITION, positionName); + this.setPrefForActiveWindow(function() { + utils.setTreePref('tabbar.position', positionName); + }); + } + aOldPosition = aOldPosition || pos; var strip = this.tabStrip;