mirror of
https://github.com/zen-browser/desktop.git
synced 2026-07-15 21:30:36 +00:00
fix: improve tab dragging behavior and enhance split view session restoration
This commit is contained in:
@@ -781,7 +781,11 @@
|
||||
newIndex++;
|
||||
}
|
||||
}
|
||||
gBrowser.moveTabTo(draggedTab, newIndex);
|
||||
// If it's the last tab, move it to the end
|
||||
if (tabsTarget === gBrowser.tabs.at(-1)) {
|
||||
newIndex++;
|
||||
}
|
||||
gBrowser.moveTabTo(draggedTab, newIndex, { forceStandaloneTab: true });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -982,6 +982,9 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this._sessionRestoring) {
|
||||
return;
|
||||
}
|
||||
this.activateSplitView(group, true);
|
||||
return;
|
||||
}
|
||||
@@ -1776,7 +1779,7 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
}
|
||||
|
||||
onAfterWorkspaceSessionRestore() {
|
||||
if (this.currentView >= 0 && !gBrowser.selectedTab.pinned) {
|
||||
if (gBrowser.selectedTab.group?.hasAttribute("split-view-group") && !gBrowser.selectedTab.pinned) {
|
||||
// Activate all browsers in the split view
|
||||
this.currentView = -1;
|
||||
this.onLocationChange(gBrowser.selectedTab.linkedBrowser);
|
||||
|
||||
Reference in New Issue
Block a user