Skip to content

Commit

Permalink
Open new private tab in position of closing tab
Browse files Browse the repository at this point in the history
(workaround for #53, part 10)
  • Loading branch information
Infocatcher committed Jun 3, 2013
1 parent 1f93985 commit b7f48f6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -817,8 +817,13 @@ var windowsObserver = {
&& this.isLastPrivate(tab)
) {
_log("Closed last private tab");
if(this.forbidCloseLastPrivate())
this.openNewPrivateTab(window);
if(this.forbidCloseLastPrivate()) {
var newTab = this.openNewPrivateTab(window);
var pos = "_tPos" in tab
? tab._tPos
: Array.indexOf(window.gBrowser.tabs, tab); // SeaMonkey
window.gBrowser.moveTabTo(newTab, pos);
}
}
},
cleanupClosedTab: function(e) {
Expand Down

0 comments on commit b7f48f6

Please sign in to comment.