mirror of
https://github.com/zen-browser/desktop.git
synced 2026-09-18 18:54:43 +00:00
gh-13196: Fixed sidebar not hiding if the urlbar is open (gh-15403)
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 ||
|
||||
|
||||
Reference in New Issue
Block a user