react-on-screen icon indicating copy to clipboard operation
react-on-screen copied to clipboard

Allow passing prop to change tag to listen for scroll

Open Freysi21 opened this issue 5 years ago • 1 comments

Hi

Love the component been using it a bunch. I just refactored my website to handle parallax scrolling with translateZ and perspective. This scrambled a bunch of stuff for example a fixed header within the body layout. So I needed to move the overflow scroll property from body to a child tag.

Now the visibility component doesn't work since it only listens to window scroll or document scroll.

Freysi21 avatar Jul 21 '19 17:07 Freysi21

I started this pull request

https://github.com/fkhadra/react-on-screen/pulls

I change the .gitignore to refrence the repo in my package.json.

Essentially I just passed in the id of the new scrolling element to listen to and search it with getElementById

Freysi21 avatar Jul 22 '19 19:07 Freysi21