mirror of
https://github.com/zen-browser/desktop.git
synced 2026-05-01 19:45:09 +00:00
feat: Improved dragging normal tabs to the pinned section, b=no-bug, c=tabs, folders, workspaces
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user