mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-15 14:26:12 +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
|
// Dont register the hover if the urlbar is floating and we are hovering over it
|
||||||
this.clearFlashTimeout('has-hover' + target.id);
|
this.clearFlashTimeout('has-hover' + target.id);
|
||||||
if (
|
if (
|
||||||
event.target.closest('#urlbar[zen-floating-urlbar]') ||
|
event.explicitOriginalTarget.closest('#urlbar[zen-floating-urlbar]') ||
|
||||||
this.sidebar.getAttribute('supress-primary-adjustment') === 'true'
|
this.sidebar.getAttribute('supress-primary-adjustment') === 'true'
|
||||||
) {
|
) {
|
||||||
|
this._hasHoveredUrlbar = this.sidebar.getAttribute('supress-primary-adjustment') !== 'true';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
window.requestAnimationFrame(() => target.setAttribute('zen-has-hover', 'true'));
|
window.requestAnimationFrame(() => target.setAttribute('zen-has-hover', 'true'));
|
||||||
@@ -452,10 +453,15 @@ var gZenCompactModeManager = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
this.hoverableElements[i].keepHoverDuration &&
|
event.explicitOriginalTarget.closest('#urlbar[zen-floating-urlbar]') ||
|
||||||
!event.target.querySelector('#urlbar[zen-floating-urlbar]') &&
|
this.sidebar.getAttribute('supress-primary-adjustment') === 'true' ||
|
||||||
!(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');
|
this.flashElement(target, this.hoverableElements[i].keepHoverDuration, 'has-hover' + target.id, 'zen-has-hover');
|
||||||
} else {
|
} else {
|
||||||
this._removeHoverFrames[target.id] = window.requestAnimationFrame(() => target.removeAttribute('zen-has-hover'));
|
this._removeHoverFrames[target.id] = window.requestAnimationFrame(() => target.removeAttribute('zen-has-hover'));
|
||||||
|
@@ -163,7 +163,7 @@
|
|||||||
#navigator-toolbox:has(.tabbrowser-tab:active),
|
#navigator-toolbox:has(.tabbrowser-tab:active),
|
||||||
&[zen-renaming-tab='true'] #navigator-toolbox,
|
&[zen-renaming-tab='true'] #navigator-toolbox,
|
||||||
#navigator-toolbox:has(
|
#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']) {
|
&:not([animate='true']) {
|
||||||
--zen-compact-mode-func: linear(
|
--zen-compact-mode-func: linear(
|
||||||
|
@@ -380,12 +380,15 @@
|
|||||||
<hbox class="zen-theme-picker-custom-list-item">
|
<hbox class="zen-theme-picker-custom-list-item">
|
||||||
<html:div class="zen-theme-picker-dot custom"></html:div>
|
<html:div class="zen-theme-picker-dot custom"></html:div>
|
||||||
<label class="zen-theme-picker-custom-list-item-label"></label>
|
<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>
|
</hbox>
|
||||||
`);
|
`);
|
||||||
listItems.querySelector('.zen-theme-picker-custom-list-item').setAttribute('data-color', color);
|
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-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-label').textContent = color;
|
||||||
|
listItems
|
||||||
|
.querySelector('.zen-theme-picker-custom-list-item-remove')
|
||||||
|
.addEventListener('command', this.removeCustomColor.bind(this));
|
||||||
|
|
||||||
this.customColorList.appendChild(listItems);
|
this.customColorList.appendChild(listItems);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user