This commit is contained in:
Mr. M
2025-04-13 10:20:13 +02:00
10 changed files with 98 additions and 88 deletions

View File

@@ -137,10 +137,6 @@
& #urlbar[open][zen-floating-urlbar='true'] {
transition: left 0.05s ease;
visibility: visible;
#navigator-toolbox:has(&) {
opacity: 1;
}
}
&::before {
@@ -276,9 +272,9 @@
transition:
left 0.25s var(--zen-compact-mode-func),
right 0.25s var(--zen-compact-mode-func);
opacity: 1;
&:not([supress-primary-adjustment='true']) {
opacity: 1;
left: calc(var(--zen-element-separation) / -2);
:root[zen-right-side='true'] & {
right: calc(var(--zen-element-separation) / -2);

View File

@@ -64,6 +64,10 @@ var gZenCompactModeManager = {
set preference(value) {
if (this.preference === value || document.documentElement.hasAttribute('zen-compact-animating')) {
if (typeof this._wasInCompactMode !== 'undefined') {
// We wont do anything with it anyway, so we remove it
delete this._wasInCompactMode;
}
// We dont want the user to be able to spam the button
return value;
}
@@ -207,6 +211,10 @@ var gZenCompactModeManager = {
if (!canAnimate) {
this.sidebar.removeAttribute('animate');
document.documentElement.removeAttribute('zen-compact-animating');
this.getAndApplySidebarWidth({});
this._ignoreNextResize = true;
resolve();
return;
}
@@ -417,13 +425,6 @@ var gZenCompactModeManager = {
}
}
// When moving the cursor between the url bar and bookmarks, or in-between bookmarks in the bookmark bar, the
// mouseLeave event is triggered without a relatedTarget.
// TODO: Experiment with this for some time, see if people still have issues with the hover state
//if (event.relatedTarget == null) {
// return;
//}
// If it's a child element but not the target, ignore the event
if (target.contains(event.explicitOriginalTarget) && event.explicitOriginalTarget !== target) {
return;