fix: Fixed top toolbar staying at the top when clicking on the urlbar, b=(no-bug), c=compact-mode

This commit is contained in:
Mr. M
2025-05-13 11:31:07 +02:00
parent 0f140b706e
commit 337b1aec53
2 changed files with 12 additions and 13 deletions

View File

@@ -447,9 +447,6 @@ var gZenCompactModeManager = {
addMouseActions() {
gURLBar.textbox.addEventListener('mouseenter', (event) => {
if (!gZenVerticalTabsManager._hasSetSingleToolbar) {
return;
}
if (event.target.closest('#urlbar[zen-floating-urlbar]')) {
// Ignore sidebar mouse enter if the urlbar is floating
this.clearFlashTimeout('has-hover' + gZenVerticalTabsManager._hasSetSingleToolbar);
@@ -507,7 +504,8 @@ var gZenCompactModeManager = {
if (
event.explicitOriginalTarget.closest('#urlbar[zen-floating-urlbar]') ||
document.documentElement.getAttribute('supress-primary-adjustment') === 'true' ||
(document.documentElement.getAttribute('supress-primary-adjustment') === 'true' &&
gZenVerticalTabsManager._hasSetSingleToolbar) ||
this._hasHoveredUrlbar
) {
return;

View File

@@ -7,6 +7,11 @@
:root[zen-compact-mode='true']:not([customizing]):not([inDOMFullscreen='true']) {
%include ../tabs/zen-tabs/vertical-tabs-topbuttons-fix.css
& #urlbar {
visibility: visible;
}
@media -moz-pref('zen.view.compact.hide-tabbar') or -moz-pref('zen.view.use-single-toolbar') {
&:not([zen-compact-animating]) {
& #zen-sidebar-splitter {
@@ -49,10 +54,6 @@
/* Initial padding for when we are animating */
padding: 0 0 0 var(--zen-toolbox-padding) !important;
& #urlbar {
visibility: visible;
}
&:not([animate='true']) {
position: fixed;
z-index: 10;
@@ -356,7 +357,7 @@
position: relative !important;
}
& #urlbar {
& #urlbar:not([breakout-extend='true']) {
opacity: 0 !important;
}
@@ -368,12 +369,12 @@
}
}
& #zen-appcontent-navbar-container[zen-has-hover],
& #zen-appcontent-navbar-container:hover,
& #zen-appcontent-navbar-container:focus-within,
& #zen-appcontent-navbar-container[zen-has-hover]:not(:has(#urlbar[zen-floating-urlbar='true']:hover)),
& #zen-appcontent-navbar-container[zen-user-show],
& #zen-appcontent-navbar-container[has-popup-menu],
& #zen-appcontent-navbar-container:has(*:is([panelopen='true'], [open='true']):not(.zen-compact-mode-ignore)) {
& #zen-appcontent-navbar-container:has(
*:is([panelopen='true'], [open='true'], #urlbar:focus-within, [breakout-extend='true']):not(#urlbar[zen-floating-urlbar='true']):not(.zen-compact-mode-ignore)
) {
opacity: 1;
border-top-width: 1px;