Fixed opening glance inside a previous glance window, leaving the background transparent

This commit is contained in:
mr. M 2024-11-03 12:06:49 +01:00
parent de5f66648a
commit 8fce947f5f
No known key found for this signature in database
GPG key ID: CBD57A2AEDBDA1FB

View file

@ -139,6 +139,7 @@
index: this.currentParentTab._tPos + 1, index: this.currentParentTab._tPos + 1,
}); });
let quikcCloseZen = false;
if (onTabClose) { if (onTabClose) {
// Create new tab if no more ex // Create new tab if no more ex
if (gBrowser.tabs.length === 1) { if (gBrowser.tabs.length === 1) {
@ -148,6 +149,7 @@
this._duringOpening = true; this._duringOpening = true;
gBrowser.tabContainer.advanceSelectedTab(1, true); // to skip the current tab gBrowser.tabContainer.advanceSelectedTab(1, true); // to skip the current tab
this._duringOpening = false; this._duringOpening = false;
quikcCloseZen = true;
} }
} }
@ -164,7 +166,7 @@
return; return;
} }
if (!onTabClose) { if (!onTabClose || quikcCloseZen) {
this.quickCloseGlance(); this.quickCloseGlance();
} }
this.overlay.removeAttribute("fade-out"); this.overlay.removeAttribute("fade-out");
@ -211,7 +213,8 @@
gBrowser.selectedTab = this.#currentTab; gBrowser.selectedTab = this.#currentTab;
} catch (e) {} } catch (e) {}
this.currentParentTab.linkedBrowser.closest(".browserSidebarContainer").classList.add("deck-selected"); this.currentParentTab.linkedBrowser.closest(".browserSidebarContainer").classList.add("deck-selected", "zen-glance-background");
this.currentParentTab.linkedBrowser.closest(".browserSidebarContainer").classList.remove("zen-glance-overlay");
this.currentParentTab.linkedBrowser.zenModeActive = true; this.currentParentTab.linkedBrowser.zenModeActive = true;
this.#currentBrowser.zenModeActive = true; this.#currentBrowser.zenModeActive = true;
this.currentParentTab.linkedBrowser.docShellIsActive = true; this.currentParentTab.linkedBrowser.docShellIsActive = true;
@ -221,7 +224,6 @@
this.currentParentTab._visuallySelected = true; this.currentParentTab._visuallySelected = true;
this.overlay.classList.add("deck-selected"); this.overlay.classList.add("deck-selected");
this.currentParentTab.linkedBrowser.closest(".browserSidebarContainer").classList.add("zen-glance-background");
this._duringOpening = false; this._duringOpening = false;
} }