Skip to content

Commit

Permalink
Ignore "TabRemotenessChange" after trick to not store closed tab
Browse files Browse the repository at this point in the history
(#237, also related to #244)
  • Loading branch information
Infocatcher committed Feb 4, 2017
1 parent f4b285f commit bba76f6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2247,6 +2247,8 @@ var privateTab = {
},
fixTabRemoteness: function(e) {
var tab = e.originalTarget || e.target;
if("_privateTabWillClosed" in tab)
return;
var isPrivate = tab.hasAttribute(this.privateAttr);
var window = e.currentTarget;
if(isPrivate == this.isPrivateWindow(window)) {
Expand Down Expand Up @@ -3834,6 +3836,7 @@ var privateTab = {
}
delete dupTab._privateTabWaitInitialize;
// Make tab empty to not save in undo close history
tab._privateTabWillClosed = true; // To ignore "TabRemotenessChange" event
this.ss.setTabState(tab, '{"entries":[]}');
gBrowser.removeTab(tab);
_dbgv && _log("replaceTabAndTogglePrivate() -> removeTab() after " + (Date.now() - startTime) + " ms");
Expand Down

0 comments on commit bba76f6

Please sign in to comment.