Beacon positioning on scroll
I the target of the beacon in inside a container with scroll (overflow: scroll), the beacon should be repositioned after each scroll.
In the same fashion as with window resize, the events would be debounceable.
This will not work currently since the Joyride component is bound to the body.
Great work on this project @gilbarbara
I'd really like to use react-joyride in an app where most of the content is in a scrollable div.
What happens now is that if the target element is off screen (e.g. because the containing div has scrolled past it), the beacon will render just near the top of the screen, detached from the target.
I dabbled a little and found that the x/y coordinates are clipped here: https://github.com/gilbarbara/react-joyride/blob/master/src/scripts/Joyride.jsx#L1093
If I disable preventWindowOverflow on that line, the beacon is positioned correctly, but scrolling to the next step doesn't work.
I'm not sure if there is a fundamental incompatibility with scrollable divs, but if you have any suggestions for what would be required to fix it I would be happy to work on it!
Hi @Khodeir, scroll-containers are a big unsolved problem so far. There has been an attempt to add support, but unfortunately we couldn't merge it as it was. You can check that thread for some ideas and issues though, if you're considering cracking this nut. :)