gh-13196: Fixed sidebar not hiding if the urlbar is open (gh-15403)

This commit is contained in:
mr. m
2026-09-14 20:56:36 +02:00
committed by GitHub
parent d2acc61a88
commit 644bf48b6c
6 changed files with 17 additions and 18 deletions

View File

@@ -990,14 +990,7 @@ window.gZenVerticalTabsManager = {
});
ChromeUtils.defineLazyGetter(this, "hidesTabsToolbar", () => {
return (
document.documentElement
.getAttribute("chromehidden")
?.includes("toolbar") ||
document.documentElement
.getAttribute("chromehidden")
?.includes("menubar")
);
return document.documentElement.hasAttribute("popup-window");
});
XPCOMUtils.defineLazyPreferenceGetter(

View File

@@ -3,7 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
:root:not([inDOMFullscreen="true"]):not([chromehidden~="location"]):not([chromehidden~="toolbar"]) {
:root:not([inDOMFullscreen="true"]):not([popup-window]) {
& #tabbrowser-tabbox #tabbrowser-tabpanels .browserSidebarContainer {
--zen-transparent-browser-background: light-dark(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.1));
overflow: clip;

View File

@@ -20,7 +20,7 @@ body,
position: inherit;
}
:root:is([inDOMFullscreen="true"], [chromehidden~="location"], [chromehidden~="toolbar"]) {
:root:is([inDOMFullscreen="true"], [popup-window]) {
#navigator-toolbox,
#zen-sidebar-splitter {
visibility: collapse;
@@ -170,7 +170,7 @@ body,
min-width: 1px;
}
:root:not([inDOMFullscreen="true"]):not([chromehidden~="location"]):not([chromehidden~="toolbar"]) {
:root:not([inDOMFullscreen="true"]):not([popup-window]) {
& #zen-tabbox-wrapper {
margin: var(--zen-element-separation);
margin-top: 0;

View File

@@ -303,7 +303,7 @@
}
}
#main-window[windowtype="navigator:browser"]:not([chromehidden~='toolbar']) {
#main-window[windowtype="navigator:browser"]:not([popup-window]) {
min-height: 495px !important;
@media (-moz-windows-mica) or (-moz-platform: macos) or ((-moz-platform: linux) and

View File

@@ -165,9 +165,7 @@ window.gZenCompactModeManager = {
},
get shouldBeCompact() {
return !document.documentElement
.getAttribute("chromehidden")
?.includes("toolbar");
return !document.documentElement.hasAttribute("popup-window");
},
set preference(value) {
@@ -864,7 +862,6 @@ window.gZenCompactModeManager = {
"supress-primary-adjustment"
) === "true" &&
gZenVerticalTabsManager._hasSetSingleToolbar) ||
this._hasHoveredUrlbar ||
this._ignoreNextHover ||
(event.type === "dragleave" &&
event.explicitOriginalTarget !== target &&
@@ -877,7 +874,10 @@ window.gZenCompactModeManager = {
return;
}
if (this.hoverableElements[i].keepHoverDuration) {
if (
this.hoverableElements[i].keepHoverDuration &&
!this._hasHoveredUrlbar
) {
this.flashElement(
target,
this.hoverableElements[i].keepHoverDuration,

View File

@@ -1040,12 +1040,16 @@
}
this.clearSpaceSwitchTimer();
gZenFolders.highlightGroupOnDragOver(null);
// A drop into a split merges the tab away; nothing lands on it.
const toSplit = !!this.#dragOverSplit.canDrop;
super.handle_drop(event);
this.#maybeClearVerticalPinnedGridDragOver();
this.#handle_dropSwitchSpace(event);
this.#handle_dropCreateSplit(event);
this._clearDragOverSplit();
this.#landDragImage(event);
if (!toSplit) {
this.#landDragImage(event);
}
}
/**
@@ -1130,6 +1134,7 @@
);
}
// eslint-disable-next-line complexity
handle_drop_transition(dropElement, draggedTab, movingTabs, dropBefore) {
if (
dropElement?.hasAttribute("zen-empty-tab") &&
@@ -1155,6 +1160,7 @@
try {
if (
this.#isAnimatingTabMove ||
this.#dragOverSplit.canDrop ||
!gZenStartup.isReady ||
gReduceMotion ||
!dropElement ||