Skip to content

Commit

Permalink
🔥 Remove opacity animation from tab contents
Browse files Browse the repository at this point in the history
  • Loading branch information
kierandrewett committed Dec 15, 2023
1 parent 9230e6d commit 8f8b7d1
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions components/tabs/content/browser-tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,16 +336,8 @@ class BrowserRenderedTab extends BrowserCustomizableArea {
]
});

const opacityAnimation = window.timeline(inAnimation).add({
targets: this.customizableContainer,
opacity: [0, 1]
});

return new Promise((r) => {
Promise.allSettled([
widthAnimation.finished,
opacityAnimation.finished
]).then(() => {
Promise.allSettled([widthAnimation.finished]).then(() => {
this.removeAttribute("anime-animating");

r();
Expand All @@ -370,17 +362,8 @@ class BrowserRenderedTab extends BrowserCustomizableArea {
width: 0
});

const opacityAnimation = window.timeline(outAnimation).add({
targets: this.customizableContainer,
duration: outAnimation.duration / 2,
opacity: 0
});

return new Promise((r) => {
Promise.allSettled([
widthAnimation.finished,
opacityAnimation.finished
]).then(() => {
Promise.allSettled([widthAnimation.finished]).then(() => {
this.removeAttribute("anime-animating");

r();
Expand Down

0 comments on commit 8f8b7d1

Please sign in to comment.