mirror of
https://github.com/zen-browser/desktop.git
synced 2025-07-07 23:00:01 +02:00
Small fixes to split view groups
This commit is contained in:
parent
0c6fe6f77c
commit
00d8f60a02
3 changed files with 28 additions and 17 deletions
|
@ -225,6 +225,9 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
|||
this._hasAnimated = true;
|
||||
for (const tab of gBrowser.tabs) {
|
||||
tab.style.removeProperty('transform');
|
||||
if (tab.group) {
|
||||
tab.group.style.removeProperty('transform');
|
||||
}
|
||||
}
|
||||
// Add a min width to all the browser elements to prevent them from resizing
|
||||
for (const browser of gBrowser.browsers) {
|
||||
|
@ -998,6 +1001,10 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this._sessionRestoring) {
|
||||
return;
|
||||
}
|
||||
this.activateSplitView(splitData);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
index 5f406ea5d09273c9b70b84eee24c6267f88692f8..25076e5fdbe5a60cc0f35640652ba8525a55b093 100644
|
||||
index 5f406ea5d09273c9b70b84eee24c6267f88692f8..82926278b2f71b8251b06bde6f62bcdc885cb760 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -424,11 +424,67 @@
|
||||
|
@ -22,7 +22,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..25076e5fdbe5a60cc0f35640652ba852
|
|||
+ get _numVisiblePinTabsWithoutCollapsed() {
|
||||
+ let i = 0;
|
||||
+ for (let item of this.tabContainer.ariaFocusableItems) {
|
||||
+ if (!!item?.classList?.contains("tab-group-label")) {
|
||||
+ if (!!item?.classList?.contains("tab-group-label") && item.closest("tab-group").pinned) {
|
||||
+ i += 1;
|
||||
+ continue;
|
||||
+ }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
|
||||
index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..40593b305688d24a0b702714a91af551c7f833f9 100644
|
||||
index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..bf956639f7d17d6d652f3b2d6cb174904b5b5da9 100644
|
||||
--- a/browser/components/tabbrowser/content/tabs.js
|
||||
+++ b/browser/components/tabbrowser/content/tabs.js
|
||||
@@ -93,7 +93,7 @@
|
||||
|
@ -448,7 +448,17 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..40593b305688d24a0b702714a91af551
|
|||
) {
|
||||
return this.#rtlMode ? -shiftSize : shiftSize;
|
||||
}
|
||||
@@ -2507,6 +2553,10 @@
|
||||
@@ -2485,6 +2531,9 @@
|
||||
break;
|
||||
}
|
||||
let element = tabs[mid];
|
||||
+ if (element?.group?.hasAttribute("split-view-group")) {
|
||||
+ element = element.group.labelElement;
|
||||
+ }
|
||||
let elementForSize = isTabGroupLabel(element)
|
||||
? element.parentElement
|
||||
: element;
|
||||
@@ -2507,6 +2556,10 @@
|
||||
if (!dropElement) {
|
||||
dropElement = this.ariaFocusableItems[oldDropElementIndex];
|
||||
}
|
||||
|
@ -459,7 +469,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..40593b305688d24a0b702714a91af551
|
|||
let newDropElementIndex = dropElement
|
||||
? dropElement.elementIndex
|
||||
: oldDropElementIndex;
|
||||
@@ -2566,12 +2616,12 @@
|
||||
@@ -2566,12 +2619,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -474,7 +484,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..40593b305688d24a0b702714a91af551
|
|||
dropElement != draggedTab &&
|
||||
isTab(dropElement) &&
|
||||
!dropElement?.group &&
|
||||
@@ -2639,7 +2689,7 @@
|
||||
@@ -2639,7 +2692,7 @@
|
||||
// Shift background tabs to leave a gap where the dragged tab
|
||||
// would currently be dropped.
|
||||
for (let item of tabs) {
|
||||
|
@ -483,7 +493,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..40593b305688d24a0b702714a91af551
|
|||
continue;
|
||||
}
|
||||
|
||||
@@ -2648,8 +2698,15 @@
|
||||
@@ -2648,6 +2701,9 @@
|
||||
if (isTabGroupLabel(item)) {
|
||||
// Shift the `.tab-group-label-container` to shift the label element.
|
||||
item = item.parentElement;
|
||||
|
@ -491,15 +501,9 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..40593b305688d24a0b702714a91af551
|
|||
+ item = item.parentElement;
|
||||
+ }
|
||||
}
|
||||
+ if (item.group?.hasAttribute("split-view-group")) {
|
||||
+ item.group.style.transform = transform;
|
||||
+ } else {
|
||||
item.style.transform = transform;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2697,8 +2754,9 @@
|
||||
@@ -2697,8 +2753,9 @@
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -511,7 +515,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..40593b305688d24a0b702714a91af551
|
|||
return;
|
||||
}
|
||||
|
||||
@@ -2711,6 +2769,12 @@
|
||||
@@ -2711,6 +2768,12 @@
|
||||
item = item.parentElement;
|
||||
}
|
||||
item.style.transform = "";
|
||||
|
@ -524,7 +528,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..40593b305688d24a0b702714a91af551
|
|||
item.removeAttribute("dragover-createGroup");
|
||||
}
|
||||
this.removeAttribute("movingtab-createGroup");
|
||||
@@ -2754,7 +2818,7 @@
|
||||
@@ -2754,7 +2817,7 @@
|
||||
let postTransitionCleanup = () => {
|
||||
movingTab._moveTogetherSelectedTabsData.animate = false;
|
||||
};
|
||||
|
@ -533,7 +537,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..40593b305688d24a0b702714a91af551
|
|||
postTransitionCleanup();
|
||||
} else {
|
||||
let onTransitionEnd = transitionendEvent => {
|
||||
@@ -2924,7 +2988,7 @@
|
||||
@@ -2924,7 +2987,7 @@
|
||||
}
|
||||
|
||||
_notifyBackgroundTab(aTab) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue