mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
Update visibility handling in ZenWorkspaces by replacing position styles with hidden attribute
This commit is contained in:
@@ -1495,9 +1495,9 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
container.style.transform = `translateX(${newTransform + offsetPixels / 2}%)`;
|
||||
container.style.opacity = offsetPixels ? 1 : !newTransform;
|
||||
if (!offsetPixels && !container.hasAttribute('active')) {
|
||||
container.style.position = 'fixed';
|
||||
container.setAttribute('hidden', 'true');
|
||||
} else {
|
||||
container.style.removeProperty('position');
|
||||
container.removeAttribute('hidden');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1541,7 +1541,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
const newTransform = `translateX(${offset}%)`;
|
||||
const isCurrent = offset === 0;
|
||||
if (shouldAnimate) {
|
||||
element.style.removeProperty('position');
|
||||
element.removeAttribute('hidden');
|
||||
if (isCurrent) {
|
||||
element.style.opacity = 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user