angular-ui / angular-ui/ui-scroll

$window.scrollTo() not handled correctly

Open
#89 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
326
Forks
104
PR merge metrics
No merged PRs in 30d

Description

I discovered a problem using $window.scrollTo(). When using this function to trigger scroll events everything works fine as long as the scroller doesn't need to request new data from the data source. As soon as the scroller needs to request data from the data source the page will stop at a random position.

Here is a plnkr showing this problem: https://plnkr.co/edit/5jANsQnob1YE6DLrSgU6?p=preview

You can use the buttons on top to switch back and forth between position 0 and 100. Everything will work fine. But if you try to switch between position 0 and 2000 the scroller will stop once he needs to requests new data. After multiple times using the button you will reach position 2000 but the scroller won't correctly jump back to 0 (instead it will be something like 80).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.