1
1
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
2
- index 96fd8acdc09cc4c9649d1ed7503c2a0bde536613..87fb109037d13183e76184201de600a92b6a07d6 100644
2
+ index 96fd8acdc09cc4c9649d1ed7503c2a0bde536613..1033da146ef5a3463f9fb15168060424b64a64ab 100644
3
3
--- a/browser/components/tabbrowser/content/tabbrowser.js
4
4
+++ b/browser/components/tabbrowser/content/tabbrowser.js
5
5
@@ -422,15 +422,49 @@
@@ -364,10 +364,10 @@ index 96fd8acdc09cc4c9649d1ed7503c2a0bde536613..87fb109037d13183e76184201de600a9
364
364
+ gZenWorkspaces._initialTab._shouldRemove = true;
365
365
+ }
366
366
+ }
367
- }
367
+ + }
368
368
+ else {
369
369
+ gZenWorkspaces._tabToRemoveForEmpty = this.selectedTab;
370
- + }
370
+ }
371
371
+ this._hasAlreadyInitializedZenSessionStore = true;
372
372
373
373
if (tabs.length > 1 || !tabs[0].selected) {
@@ -612,10 +612,13 @@ index 96fd8acdc09cc4c9649d1ed7503c2a0bde536613..87fb109037d13183e76184201de600a9
612
612
element = element.group;
613
613
if (targetElement?.group) {
614
614
targetElement = targetElement.group;
615
- @@ -6130,8 +6260,12 @@
615
+ @@ -6130,8 +6260,15 @@
616
616
}
617
617
618
618
// Don't allow mixing pinned and unpinned tabs.
619
+ + if (targetElement.group?.hasAttribute("split-view-group")) {
620
+ + targetElement = targetElement.group;
621
+ + }
619
622
+ targetElement = gZenGlanceManager.getTabOrGlanceParent(targetElement);
620
623
+ if (element.hasAttribute('zen-essential') && !targetElement?.hasAttribute('zen-essential')) {
621
624
+ targetElement = this.tabsWithoutGlance[this._numZenEssentials - 1];
@@ -626,7 +629,7 @@ index 96fd8acdc09cc4c9649d1ed7503c2a0bde536613..87fb109037d13183e76184201de600a9
626
629
moveBefore = false;
627
630
} else if (!element.pinned && targetElement && targetElement.pinned) {
628
631
// If the caller asks to move an unpinned element next to a pinned
629
- @@ -6145,7 +6279 ,7 @@
632
+ @@ -6145,7 +6282 ,7 @@
630
633
// move the tab group right before the first unpinned tab.
631
634
// 4. Moving a tab group and the first unpinned tab is grouped:
632
635
// move the tab group right before the first unpinned tab's tab group.
@@ -635,15 +638,15 @@ index 96fd8acdc09cc4c9649d1ed7503c2a0bde536613..87fb109037d13183e76184201de600a9
635
638
if (targetElement.group) {
636
639
targetElement = targetElement.group;
637
640
}
638
- @@ -6153,6 +6287 ,7 @@
641
+ @@ -6153,6 +6290 ,7 @@
639
642
}
640
643
641
644
let getContainer = () =>
642
645
+ element.hasAttribute("zen-essential") ? gZenWorkspaces.getEssentialsSection(element) :
643
646
element.pinned
644
647
? this.tabContainer.pinnedTabsContainer
645
648
: this.tabContainer;
646
- @@ -6210,7 +6345 ,7 @@
649
+ @@ -6210,7 +6348 ,7 @@
647
650
if (!this.isTab(aTab)) {
648
651
throw new Error("Can only move a tab into a tab group");
649
652
}
@@ -652,7 +655,7 @@ index 96fd8acdc09cc4c9649d1ed7503c2a0bde536613..87fb109037d13183e76184201de600a9
652
655
return;
653
656
}
654
657
if (aTab.group && aTab.group.id === aGroup.id) {
655
- @@ -6304,6 +6439 ,10 @@
658
+ @@ -6304,6 +6442 ,10 @@
656
659
657
660
moveActionCallback();
658
661
@@ -663,7 +666,7 @@ index 96fd8acdc09cc4c9649d1ed7503c2a0bde536613..87fb109037d13183e76184201de600a9
663
666
// Clear tabs cache after moving nodes because the order of tabs may have
664
667
// changed.
665
668
this.tabContainer._invalidateCachedTabs();
666
- @@ -7198,7 +7337 ,7 @@
669
+ @@ -7198,7 +7340 ,7 @@
667
670
// preventDefault(). It will still raise the window if appropriate.
668
671
break;
669
672
}
@@ -672,15 +675,15 @@ index 96fd8acdc09cc4c9649d1ed7503c2a0bde536613..87fb109037d13183e76184201de600a9
672
675
window.focus();
673
676
aEvent.preventDefault();
674
677
break;
675
- @@ -8143,6 +8282 ,7 @@
678
+ @@ -8143,6 +8285 ,7 @@
676
679
aWebProgress.isTopLevel
677
680
) {
678
681
this.mTab.setAttribute("busy", "true");
679
682
+ if (!this.mTab.selected) this.mTab.setAttribute("unread", "true");
680
683
gBrowser._tabAttrModified(this.mTab, ["busy"]);
681
684
this.mTab._notselectedsinceload = !this.mTab.selected;
682
685
}
683
- @@ -9108,7 +9248 ,7 @@ var TabContextMenu = {
686
+ @@ -9108,7 +9251 ,7 @@ var TabContextMenu = {
684
687
);
685
688
contextUnpinSelectedTabs.hidden =
686
689
!this.contextTab.pinned || !this.multiselected;
@@ -689,7 +692,7 @@ index 96fd8acdc09cc4c9649d1ed7503c2a0bde536613..87fb109037d13183e76184201de600a9
689
692
// Move Tab items
690
693
let contextMoveTabOptions = document.getElementById(
691
694
"context_moveTabOptions"
692
- @@ -9384,6 +9524 ,7 @@ var TabContextMenu = {
695
+ @@ -9384,6 +9527 ,7 @@ var TabContextMenu = {
693
696
)
694
697
);
695
698
} else {
0 commit comments