From a9c59cc28600c8b9d5bccfc463af7cdc416c9f33 Mon Sep 17 00:00:00 2001 From: Piro / YUKI Hiroshi Date: Tue, 8 Oct 2013 02:47:53 +0900 Subject: [PATCH] Don't focus to the tab which is going to be removed. This fixes #569. In the previous revision, onTabClose method tried to focus to the first child even if it was going to be closed as a member of closing tree. Then TabSelect event was unexpectedly fired, TabWindow.prototype.handleEven (defined in resource:///modules/WindowsPreviewPerTab.jsm) raised an error, and blocked all following event handlers for TabSelect event. As the result, cached tabs list were not cleared and Ctrl-Tab feature was killed. --- modules/browser.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/browser.js b/modules/browser.js index e6723f59..b9e31249 100644 --- a/modules/browser.js +++ b/modules/browser.js @@ -3049,6 +3049,9 @@ TreeStyleTabBrowser.prototype = { if (nextFocusedTab && toBeClosedTabs.indexOf(nextFocusedTab) > -1) nextFocusedTab = this.getNextFocusedTab(nextFocusedTab); + if (nextFocusedTab && nextFocusedTab.hasAttribute(this.kREMOVED)) + nextFocusedTab = null; + this._reserveCloseRelatedTabs(toBeClosedTabs); this.detachTab(tab, { dontUpdateIndent : true });