fix: Allow the sidebar to be hovered even when the pref is off, b=no-bug, c=common, compact-mode, glance, tabs, workspaces

This commit is contained in:
mr. m
2025-11-11 10:22:05 +01:00
parent 2bed07f7c6
commit fc804acdb0
6 changed files with 788 additions and 782 deletions

View File

@@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// 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/.
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
import { AppConstants } from 'resource://gre/modules/AppConstants.sys.mjs';

View File

@@ -149,7 +149,7 @@
visibility 0.15s;
}
#navigator-toolbox[zen-has-hover='true'] &,
#navigator-toolbox[zen-has-implicit-hover='true'] &,
&[open],
#urlbar[has-popup-open='true'] &,
#identity-box[pageproxystate='invalid'] & {

File diff suppressed because it is too large Load Diff

View File

@@ -55,9 +55,6 @@ export class ZenGlanceChild extends JSWindowActorChild {
}
on_click(event) {
if (event.button !== 0 || event.defaultPrevented) {
return;
}
// get closest A element
const target = event.target.closest('A');
const elementToRecord = event.originalTarget || event.target;
@@ -67,7 +64,7 @@ export class ZenGlanceChild extends JSWindowActorChild {
// The problem is that at that stage we don't know the rect or even what
// element has been clicked, so we send the data here.
this.#sendClickDataToParent(target, elementToRecord);
if (this.#ensureOnlyKeyModifiers(event)) {
if (event.button !== 0 || event.defaultPrevented || this.#ensureOnlyKeyModifiers(event)) {
return;
}
const activationMethod = this.#activationMethod;

View File

@@ -179,7 +179,7 @@
font-weight: 500;
gap: 2px;
#navigator-toolbox[zen-has-hover='true'] & {
#navigator-toolbox[zen-has-implicit-hover='true'] & {
visibility: visible;
opacity: 0.5;
}

View File

@@ -563,7 +563,7 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
}
get _hoveringSidebar() {
return gNavToolbox.hasAttribute('zen-has-hover');
return gNavToolbox.hasAttribute('zen-has-implicit-hover');
}
_handleAppCommand(event) {