Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite scroll event on Firefox #63

Open
csimpi opened this issue Dec 17, 2019 · 0 comments
Open

Infinite scroll event on Firefox #63

csimpi opened this issue Dec 17, 2019 · 0 comments

Comments

@csimpi
Copy link

csimpi commented Dec 17, 2019

Hi,
thank you for this awesome directive!

Interestingly, I'm having an issue with Firefox. When I scroll down the scrolling event is getting in an infinite loop, I have no idea why.

I've changed the source code and added a console.log message:

        this.listener = function (e) {
            /** @type {?} */
            console.log('SCROLL EVENT');
            var upperScreenEdgeAt = (/** @type {?} */ (e.target)).scrollTop || window.pageYOffset;
            _this.scroll$.next(upperScreenEdgeAt);
        };

When I scroll down and reach the sticky element, The SCROLL EVENT message is appering in the console thousands of times within a couple of sec, it never stops, only if I scroll back to the top.

I've tested sticky thing demo page with firefox and worked perfectly, maybe something is incompatible with my code, but I haven't found any clue.

This doesn't happen with Chrome, or Safari only Firefox.
Thanks for any suggestions!

UPDATE:
When I wrap the whole website into a flexbox with flex-column the issue disappears.

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

No branches or pull requests

1 participant