feat: Improved dragging normal tabs to the pinned section, b=no-bug, c=tabs, folders, workspaces

This commit is contained in:
Mr. M
2025-08-07 18:09:57 +02:00
parent 5f2af48c4e
commit 82f30e1820
7 changed files with 197 additions and 157 deletions

View File

@@ -349,25 +349,22 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
if (!this._hasInitializedTabsStrip) {
return gBrowser.tabContainer.arrowScrollbox;
}
return document.querySelector(`zen-workspace[active]`)?.tabsContainer;
return this.activeWorkspaceElement?.tabsContainer;
}
get pinnedTabsContainer() {
if (!this.workspaceEnabled || !this._hasInitializedTabsStrip) {
return document.getElementById('pinned-tabs-container');
}
return document.querySelector(`zen-workspace[active]`)?.pinnedTabsContainer;
return this.activeWorkspaceElement?.pinnedTabsContainer;
}
get activeWorkspaceIndicator() {
return document.querySelector(`zen-workspace[active]`)?.indicator;
return this.activeWorkspaceElement?.indicator;
}
get activeScrollbox() {
return (
document.querySelector(`zen-workspace[active]`)?.scrollbox ??
gBrowser.tabContainer.arrowScrollbox
);
return this.activeWorkspaceElement?.scrollbox ?? gBrowser.tabContainer.arrowScrollbox;
}
get tabboxChildren() {
@@ -385,6 +382,10 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
);
}
get activeWorkspaceElement() {
return this.workspaceElement(this.activeWorkspace);
}
workspaceElement(workspaceId) {
if (typeof workspaceId !== 'string') {
workspaceId = workspaceId?.uuid;