Skip to content

Commit

Permalink
bug: potential fix for vh mobile preload bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobijudah committed Feb 18, 2022
1 parent 571f4ec commit 1fa9998
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/animations/preloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,21 @@ const PreloaderAnimation = (elements: gsap.TweenTarget[]) => {
},
"-=0.8"
)
.eventCallback("onStart", () => {
gsap.set("[data-name]", {
opacity: 0,
});
})
.eventCallback("onComplete", () => {
gsap.set("#banner", {
yPercent: 100,
});
gsap.set(".hidden-init", {
visibility: "hidden",
});
gsap.set("[data-name]", {
opacity: 1,
});
preloader.kill();
});

Expand Down
4 changes: 4 additions & 0 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@
box-sizing: border-box;
}

html {
background: #000;
}

html[data-scroll-direction] {
overflow: hidden;
position: fixed;
Expand Down

1 comment on commit 1fa9998

@vercel
Copy link

@vercel vercel bot commented on 1fa9998 Feb 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.