Refactor ZenCompactMode hover animation handling and add check for ZenWorkspaces existence in browserPlacesViews

This commit is contained in:
mr. M
2025-01-14 20:42:25 +01:00
parent dd5461273c
commit 270af0ff00
2 changed files with 9 additions and 7 deletions

View File

@@ -318,10 +318,12 @@ var gZenCompactModeManager = {
target.addEventListener('mouseenter', (event) => {
this.clearFlashTimeout('has-hover' + target.id);
window.requestAnimationFrame(() => target.setAttribute('zen-has-hover', 'true'));
this._animatingElements[target.id] = true;
setTimeout(() => {
delete this._animatingElements[target.id];
}, 312.5); // 0.3125s is the duration of the sidebar animation (the longest one)
if (target.id === 'navigator-toolbox' && gZenCompactModeManager.prefefence) {
this._animatingElements[target.id] = true;
setTimeout(() => {
delete this._animatingElements[target.id];
}, 312.5); // 0.3125s is the duration of the sidebar animation (the longest one)
}
});
target.addEventListener('mouseleave', (event) => {