Skip to content

fix: invoke fade-in check on page load and prevent triggering above viewport - #51

Open
saurabhhhcodes wants to merge 3 commits into
zero-gravity-org:masterfrom
saurabhhhcodes:fix/zerogravity-batch-1
Open

fix: invoke fade-in check on page load and prevent triggering above viewport#51
saurabhhhcodes wants to merge 3 commits into
zero-gravity-org:masterfrom
saurabhhhcodes:fix/zerogravity-batch-1

Conversation

@saurabhhhcodes

Copy link
Copy Markdown

Bug 1: The fade-in effect never ran on page load — elements already in the viewport stayed invisible until the user scrolled.

Bug 2: Elements scrolled past (above viewport, rect.top < 0) also triggered the visible class.

Fix: Extracted the logic into checkFadeIn(), called it immediately on load, and added rect.bottom > 0 guard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant