Skip to content

Commit

Permalink
Don't focus to the tab which is going to be removed.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
piroor committed Oct 7, 2013
1 parent 163df63 commit a9c59cc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down

0 comments on commit a9c59cc

Please sign in to comment.