forked from ZenBrowserMirrors/zen-desktop
Refactor tab movement logic in ZenViewSplitter; ensure empty tab is last and adjust fake browser removal behavior
This commit is contained in:
parent
f0e2a68abf
commit
148c9661c2
1 changed files with 9 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
|||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
index 628aa6596627c85efe361fc1ece8fd58f7ee653e..1cd7343818d25e40d4a441f70307f7ce7ff98054 100644
|
||||
index 628aa6596627c85efe361fc1ece8fd58f7ee653e..f3cb04e9034d24752bdf6911e647fe122b7900f1 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -412,11 +412,50 @@
|
||||
|
@ -544,17 +544,18 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..1cd7343818d25e40d4a441f70307f7ce
|
|||
return;
|
||||
}
|
||||
if (aTab.group && aTab.group.id === aGroup.id) {
|
||||
@@ -5721,6 +5856,9 @@
|
||||
@@ -5721,6 +5856,10 @@
|
||||
|
||||
moveActionCallback();
|
||||
|
||||
+ ZenWorkspaces._makeSureEmptyTabIsLast();
|
||||
+ gZenViewSplitter._maybeRemoveFakeBrowser();
|
||||
+ gZenViewSplitter._maybeRemoveFakeBrowser(false);
|
||||
+ gZenViewSplitter._canDrop = false;
|
||||
+
|
||||
// Clear tabs cache after moving nodes because the order of tabs may have
|
||||
// changed.
|
||||
this.tabContainer._invalidateCachedTabs();
|
||||
@@ -5771,7 +5909,7 @@
|
||||
@@ -5771,7 +5910,7 @@
|
||||
createLazyBrowser,
|
||||
};
|
||||
|
||||
|
@ -563,7 +564,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..1cd7343818d25e40d4a441f70307f7ce
|
|||
if (aIndex < numPinned || (aTab.pinned && aIndex == numPinned)) {
|
||||
params.pinned = true;
|
||||
}
|
||||
@@ -7415,6 +7553,7 @@
|
||||
@@ -7415,6 +7554,7 @@
|
||||
aWebProgress.isTopLevel
|
||||
) {
|
||||
this.mTab.setAttribute("busy", "true");
|
||||
|
@ -571,7 +572,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..1cd7343818d25e40d4a441f70307f7ce
|
|||
gBrowser._tabAttrModified(this.mTab, ["busy"]);
|
||||
this.mTab._notselectedsinceload = !this.mTab.selected;
|
||||
}
|
||||
@@ -8381,7 +8520,7 @@ var TabContextMenu = {
|
||||
@@ -8381,7 +8521,7 @@ var TabContextMenu = {
|
||||
);
|
||||
contextUnpinSelectedTabs.hidden =
|
||||
!this.contextTab.pinned || !multiselectionContext;
|
||||
|
@ -580,7 +581,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..1cd7343818d25e40d4a441f70307f7ce
|
|||
// Move Tab items
|
||||
let contextMoveTabOptions = document.getElementById(
|
||||
"context_moveTabOptions"
|
||||
@@ -8414,7 +8553,7 @@ var TabContextMenu = {
|
||||
@@ -8414,7 +8554,7 @@ var TabContextMenu = {
|
||||
let contextMoveTabToStart = document.getElementById("context_moveToStart");
|
||||
let isFirstTab =
|
||||
tabsToMove[0] == visibleTabs[0] ||
|
||||
|
@ -589,7 +590,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..1cd7343818d25e40d4a441f70307f7ce
|
|||
contextMoveTabToStart.disabled = isFirstTab && allSelectedTabsAdjacent;
|
||||
|
||||
document.getElementById("context_openTabInWindow").disabled =
|
||||
@@ -8647,6 +8786,7 @@ var TabContextMenu = {
|
||||
@@ -8647,6 +8787,7 @@ var TabContextMenu = {
|
||||
if (this.contextTab.multiselected) {
|
||||
gBrowser.removeMultiSelectedTabs();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue