1
1
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
2
- index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..f52457bfbce52b255a26eedd04f36e9bebc79c6c 100644
2
+ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..04056ab93316968babcf32921591731291f8e9db 100644
3
3
--- a/browser/components/tabbrowser/content/tabbrowser.js
4
4
+++ b/browser/components/tabbrowser/content/tabbrowser.js
5
5
@@ -406,11 +406,52 @@
@@ -347,11 +347,19 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..f52457bfbce52b255a26eedd04f36e9b
347
347
? closeWindowWithLastTab
348
348
: !window.toolbar.visible ||
349
349
- Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab");
350
- + Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab") && !ZenWorkspaces._isClosingWindow;
350
+ + Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab") && !ZenWorkspaces._isClosingWindow && !ZenWorkspaces._removedByStartupPage ;
351
351
352
352
if (closeWindow) {
353
353
// We've already called beforeunload on all the relevant tabs if we get here,
354
- @@ -4681,9 +4794,7 @@
354
+ @@ -4641,6 +4754,7 @@
355
+
356
+ newTab = true;
357
+ }
358
+ + ZenWorkspaces._removedByStartupPage = false;
359
+ aTab._endRemoveArgs = [closeWindow, newTab];
360
+
361
+ // swapBrowsersAndCloseOther will take care of closing the window without animation.
362
+ @@ -4681,9 +4795,7 @@
355
363
aTab._mouseleave();
356
364
357
365
if (newTab) {
@@ -362,7 +370,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..f52457bfbce52b255a26eedd04f36e9b
362
370
} else {
363
371
TabBarVisibility.update();
364
372
}
365
- @@ -4812,6 +4923 ,8 @@
373
+ @@ -4812,6 +4924 ,8 @@
366
374
this.tabs[i]._tPos = i;
367
375
}
368
376
@@ -371,7 +379,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..f52457bfbce52b255a26eedd04f36e9b
371
379
if (!this._windowIsClosing) {
372
380
if (wasPinned) {
373
381
this.tabContainer._positionPinnedTabs();
374
- @@ -5025,7 +5138 ,7 @@
382
+ @@ -5025,7 +5139 ,7 @@
375
383
!excludeTabs.has(aTab.owner) &&
376
384
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
377
385
) {
@@ -380,7 +388,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..f52457bfbce52b255a26eedd04f36e9b
380
388
}
381
389
382
390
// Try to find a remaining tab that comes after the given tab
383
- @@ -5047,7 +5160 ,7 @@
391
+ @@ -5047,7 +5161 ,7 @@
384
392
}
385
393
386
394
if (tab) {
@@ -389,7 +397,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..f52457bfbce52b255a26eedd04f36e9b
389
397
}
390
398
391
399
// If no qualifying visible tab was found, see if there is a tab in
392
- @@ -5465,10 +5578 ,10 @@
400
+ @@ -5465,10 +5579 ,10 @@
393
401
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
394
402
}
395
403
@@ -402,7 +410,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..f52457bfbce52b255a26eedd04f36e9b
402
410
aTab.selected ||
403
411
aTab.closing ||
404
412
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
405
- @@ -5706,9 +5819 ,9 @@
413
+ @@ -5706,9 +5820 ,9 @@
406
414
407
415
// Don't allow mixing pinned and unpinned tabs.
408
416
if (aTab.pinned) {
@@ -414,7 +422,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..f52457bfbce52b255a26eedd04f36e9b
414
422
}
415
423
if (aTab._tPos == aIndex) {
416
424
return;
417
- @@ -5717,7 +5830 ,7 @@
425
+ @@ -5717,7 +5831 ,7 @@
418
426
this._lastRelatedTabMap = new WeakMap();
419
427
420
428
this._handleTabMove(aTab, () => {
@@ -423,7 +431,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..f52457bfbce52b255a26eedd04f36e9b
423
431
if (forceStandaloneTab && neighbor.group) {
424
432
neighbor = neighbor.group;
425
433
}
426
- @@ -5802,7 +5915 ,7 @@
434
+ @@ -5802,7 +5916 ,7 @@
427
435
createLazyBrowser,
428
436
};
429
437
@@ -432,15 +440,15 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..f52457bfbce52b255a26eedd04f36e9b
432
440
if (aIndex < numPinned || (aTab.pinned && aIndex == numPinned)) {
433
441
params.pinned = true;
434
442
}
435
- @@ -7443,6 +7556 ,7 @@
443
+ @@ -7443,6 +7557 ,7 @@
436
444
aWebProgress.isTopLevel
437
445
) {
438
446
this.mTab.setAttribute("busy", "true");
439
447
+ if (!this.mTab.selected) this.mTab.setAttribute("unread", "true");
440
448
gBrowser._tabAttrModified(this.mTab, ["busy"]);
441
449
this.mTab._notselectedsinceload = !this.mTab.selected;
442
450
gBrowser.syncThrobberAnimations(this.mTab);
443
- @@ -8411,7 +8525 ,7 @@ var TabContextMenu = {
451
+ @@ -8411,7 +8526 ,7 @@ var TabContextMenu = {
444
452
);
445
453
contextUnpinSelectedTabs.hidden =
446
454
!this.contextTab.pinned || !multiselectionContext;
@@ -449,7 +457,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..f52457bfbce52b255a26eedd04f36e9b
449
457
// Move Tab items
450
458
let contextMoveTabOptions = document.getElementById(
451
459
"context_moveTabOptions"
452
- @@ -8444,7 +8558 ,7 @@ var TabContextMenu = {
460
+ @@ -8444,7 +8559 ,7 @@ var TabContextMenu = {
453
461
let contextMoveTabToStart = document.getElementById("context_moveToStart");
454
462
let isFirstTab =
455
463
tabsToMove[0] == visibleTabs[0] ||
@@ -458,7 +466,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..f52457bfbce52b255a26eedd04f36e9b
458
466
contextMoveTabToStart.disabled = isFirstTab && allSelectedTabsAdjacent;
459
467
460
468
document.getElementById("context_openTabInWindow").disabled =
461
- @@ -8677,6 +8791 ,7 @@ var TabContextMenu = {
469
+ @@ -8677,6 +8792 ,7 @@ var TabContextMenu = {
462
470
if (this.contextTab.multiselected) {
463
471
gBrowser.removeMultiSelectedTabs();
464
472
} else {
0 commit comments