mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-15 06:16:14 +00:00
fix: Fixed jittering when opening compact mode on windows, b=(closes #7990), c=compact-mode, workspaces
This commit is contained in:
@@ -419,9 +419,10 @@ var gZenCompactModeManager = {
|
||||
// Dont register the hover if the urlbar is floating and we are hovering over it
|
||||
this.clearFlashTimeout('has-hover' + target.id);
|
||||
if (
|
||||
event.target.closest('#urlbar[zen-floating-urlbar]') ||
|
||||
event.explicitOriginalTarget.closest('#urlbar[zen-floating-urlbar]') ||
|
||||
this.sidebar.getAttribute('supress-primary-adjustment') === 'true'
|
||||
) {
|
||||
this._hasHoveredUrlbar = this.sidebar.getAttribute('supress-primary-adjustment') !== 'true';
|
||||
return;
|
||||
}
|
||||
window.requestAnimationFrame(() => target.setAttribute('zen-has-hover', 'true'));
|
||||
@@ -452,10 +453,15 @@ var gZenCompactModeManager = {
|
||||
}
|
||||
|
||||
if (
|
||||
this.hoverableElements[i].keepHoverDuration &&
|
||||
!event.target.querySelector('#urlbar[zen-floating-urlbar]') &&
|
||||
!(this.sidebar.getAttribute('supress-primary-adjustment') === 'true')
|
||||
event.explicitOriginalTarget.closest('#urlbar[zen-floating-urlbar]') ||
|
||||
this.sidebar.getAttribute('supress-primary-adjustment') === 'true' ||
|
||||
this._hasHoveredUrlbar
|
||||
) {
|
||||
delete this._hasHoveredUrlbar;
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.hoverableElements[i].keepHoverDuration) {
|
||||
this.flashElement(target, this.hoverableElements[i].keepHoverDuration, 'has-hover' + target.id, 'zen-has-hover');
|
||||
} else {
|
||||
this._removeHoverFrames[target.id] = window.requestAnimationFrame(() => target.removeAttribute('zen-has-hover'));
|
||||
|
@@ -163,7 +163,7 @@
|
||||
#navigator-toolbox:has(.tabbrowser-tab:active),
|
||||
&[zen-renaming-tab='true'] #navigator-toolbox,
|
||||
#navigator-toolbox:has(
|
||||
*:is([panelopen='true'], [open='true'], #urlbar:focus-within):not(#urlbar[zen-floating-urlbar='true']):not(tab):not(.zen-compact-mode-ignore)
|
||||
*:is([panelopen='true'], [open='true'], #urlbar:focus-within, [breakout-extend='true']):not(#urlbar[zen-floating-urlbar='true']):not(tab):not(.zen-compact-mode-ignore)
|
||||
) {
|
||||
&:not([animate='true']) {
|
||||
--zen-compact-mode-func: linear(
|
||||
|
@@ -380,12 +380,15 @@
|
||||
<hbox class="zen-theme-picker-custom-list-item">
|
||||
<html:div class="zen-theme-picker-dot custom"></html:div>
|
||||
<label class="zen-theme-picker-custom-list-item-label"></label>
|
||||
<toolbarbutton class="zen-theme-picker-custom-list-item-remove toolbarbutton-1" oncommand="gZenThemePicker.removeCustomColor(event);"></toolbarbutton>
|
||||
<toolbarbutton class="zen-theme-picker-custom-list-item-remove toolbarbutton-1"></toolbarbutton>
|
||||
</hbox>
|
||||
`);
|
||||
listItems.querySelector('.zen-theme-picker-custom-list-item').setAttribute('data-color', color);
|
||||
listItems.querySelector('.zen-theme-picker-dot').style.setProperty('--zen-theme-picker-dot-color', color);
|
||||
listItems.querySelector('.zen-theme-picker-custom-list-item-label').textContent = color;
|
||||
listItems
|
||||
.querySelector('.zen-theme-picker-custom-list-item-remove')
|
||||
.addEventListener('command', this.removeCustomColor.bind(this));
|
||||
|
||||
this.customColorList.appendChild(listItems);
|
||||
}
|
||||
|
Reference in New Issue
Block a user