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.
This commit is contained in:
Piro / YUKI Hiroshi 2013-10-08 02:47:53 +09:00
parent 163df63f04
commit a9c59cc286

View File

@ -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 });