fix: Fixed flashing on essential tabs when switching workspaces, b=no-bug, c=configs, common, folders, workspaces

This commit is contained in:
mr. m
2025-08-15 20:13:29 +02:00
parent 5dcc6d5f44
commit c8e58ad525
5 changed files with 108 additions and 92 deletions

View File

@@ -110,26 +110,8 @@ export var ZenCustomizableUI = new (class {
if (button.hasAttribute('open')) {
return;
}
const image = button.querySelector('image');
const popup = window.document.getElementById('zenCreateNewPopup');
button.setAttribute('open', 'true');
const handlePopupHidden = () => {
window.setTimeout(() => {
button.removeAttribute('open');
}, 500);
window.gZenUIManager.motion.animate(
image,
{ transform: ['rotate(45deg)', 'rotate(0deg)'] },
{ duration: 0.2 }
);
};
popup.addEventListener('popuphidden', handlePopupHidden, { once: true });
popup.openPopup(button, 'after_start');
window.gZenUIManager.motion.animate(
image,
{ transform: ['rotate(0deg)', 'rotate(45deg)'] },
{ duration: 0.2 }
);
});
}