Skip to content

Infinite scroll event on Firefox #63

@csimpi

Description

@csimpi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions