Skip to content

Commit

Permalink
Completely ignore "TabClose", if tab moved to another window
Browse files Browse the repository at this point in the history
  • Loading branch information
Infocatcher committed Sep 5, 2014
1 parent 590848d commit e5e7bb9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -1243,6 +1243,11 @@ var privateTab = {
}
},
tabCloseHandler: function(e) {
if(e.detail) {
if(e.eventPhase == e.CAPTURING_PHASE)
_log(e.type + ": tab moved to another window, ignore");
return;
}
// We can't open new private tab in bubbling phase:
// Error: TypeError: preview is undefined
// Source file: resource://app/modules/WindowsPreviewPerTab.jsm
Expand Down Expand Up @@ -1361,10 +1366,6 @@ var privateTab = {
var silentFail = false;
if(!this.oldSessionStore)
silentFail = true;
else if(e.detail) {
_log("Tab moved to another window");
silentFail = true;
}
else if(tab.hasAttribute("closedownloadtabs-closed")) {
// https://github.com/Infocatcher/Close_Download_Tabs
_log('Found "closedownloadtabs-closed" attribute');
Expand Down

0 comments on commit e5e7bb9

Please sign in to comment.