Fixed tab browser when DOM fullscreen is enabled

This commit is contained in:
Mauro Balades
2024-07-19 17:11:04 +02:00
parent 69e352624e
commit 43460815ac
2 changed files with 7 additions and 7 deletions

View File

@@ -277,15 +277,15 @@ var ZenWorkspaces = {
}
let firstTab = undefined;
// Get the number of tabs that are hidden before we start hiding them
let numHiddenTabs = gBrowser.tabs.reduce((acc, tab) => {
return tab.getAttribute("zen-workspace-id") !== window.uuid ? acc + 1 : acc;
let numShownTabs = gBrowser.tabs.reduce((acc, tab) => {
return (tab.getAttribute("zen-workspace-id") === window.uuid) ? acc + 1 : acc;
}, 0);
let workspaces = await this._workspaces();
for (let workspace of workspaces.workspaces) {
workspace.used = workspace.uuid === window.uuid;
}
this.unsafeSaveWorkspaces(workspaces);
if (numHiddenTabs === gBrowser.tabs.length) {
if (numShownTabs === gBrowser.tabs.length) {
// If all tabs are hidden, we need to create a new tab
// to show the workspace
this._createNewTabForWorkspace(window);

View File

@@ -459,12 +459,12 @@ panelmultiview {
flex-direction: row;
}
#tabbrowser-tabpanels {
:root:not([inDOMFullscreen="true"]) #tabbrowser-tabpanels {
background: transparent !important;
margin-right: 10px;
}
#tabbrowser-tabbox #tabbrowser-tabpanels .browserSidebarContainer {
:root:not([inDOMFullscreen="true"]) #tabbrowser-tabbox #tabbrowser-tabpanels .browserSidebarContainer {
border-radius: var(--zen-browser-border-radius);
border: var(--zen-appcontent-border);
width: 100%;
@@ -507,7 +507,7 @@ panelmultiview {
max-height: 1px;
}
#tabbrowser-tabbox #tabbrowser-tabpanels .browserSidebarContainer {
:root:not([inDOMFullscreen="true"]) #tabbrowser-tabbox #tabbrowser-tabpanels .browserSidebarContainer {
margin: 10px !important;
margin-right: 0 !important;
margin-top: 0 !important;
@@ -541,7 +541,7 @@ panelmultiview {
border-bottom: var(--zen-appcontent-border) !important;
}
& #tabbrowser-tabbox #tabbrowser-tabpanels .browserSidebarContainer {
:root:not([inDOMFullscreen="true"]) & #tabbrowser-tabbox #tabbrowser-tabpanels .browserSidebarContainer {
margin-top: 10px !important;
}
}