civiccc / civiccc/react-waypoint

waypoint triggers unintentionally when page is scrolled by setting document.body.scrollTop

Open
#311 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4k
Forks
206
PR merge metrics
No merged PRs in 30d

Description

Hey guys! Thank you so much for this great tool!
Not sure if the title is clear enough. The problem i'm having right now is I have a few waypoint components in the page. And there's another interaction that if user clicks a button/link, the page will automatically scroll to a certain position by setting **document.body.scrollTop**. When the page scrolls some waypoint components would be passed, which will trigger the **onEnter** events of them unintentionally. Is there anyway to avoid that? I have some events tracking binded to those components but I don't want to track cases like these.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.