mirror of
https://github.com/zen-browser/components.git
synced 2025-07-07 21:39:58 +02:00
Fixed workspaces
This commit is contained in:
parent
64768bd518
commit
329b197bda
1 changed files with 5 additions and 3 deletions
|
@ -490,13 +490,14 @@ var ZenWorkspaces = {
|
|||
}
|
||||
this.unsafeSaveWorkspaces(workspaces);
|
||||
console.info('ZenWorkspaces: Changing workspace to', window.uuid);
|
||||
for (let tab of gBrowser.tabs) {
|
||||
for (let i = 0; i < gBrowser.tabs.length; i++) {
|
||||
let tab = gBrowser.tabs[i];
|
||||
if ((tab.getAttribute('zen-workspace-id') === window.uuid && !(tab.pinned && !shouldAllowPinnedTabs)) || !tab.hasAttribute('zen-workspace-id')) {
|
||||
if (!firstTab) {
|
||||
firstTab = tab;
|
||||
} else if (gBrowser.selectedTab === tab) {
|
||||
// If the selected tab is already in the workspace, we don't want to change it
|
||||
firstTab = undefined;
|
||||
firstTab = null; // note: Do not add "undefined" here, a new tab would be created
|
||||
}
|
||||
gBrowser.showTab(tab);
|
||||
if (!tab.hasAttribute('zen-workspace-id')) {
|
||||
|
@ -512,7 +513,8 @@ var ZenWorkspaces = {
|
|||
if (typeof firstTab === 'undefined' && !onInit) {
|
||||
this._createNewTabForWorkspace(window);
|
||||
}
|
||||
for (let tab of gBrowser.tabs) {
|
||||
for (let i = 0; i < gBrowser.tabs.length; i++) {
|
||||
let tab = gBrowser.tabs[i];
|
||||
if (tab.getAttribute('zen-workspace-id') !== window.uuid) {
|
||||
// FOR UNLOADING TABS:
|
||||
// gBrowser.discardBrowser(tab, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue