angular-ui / angular-ui/ui-scroll

$window.scrollTo() not handled correctly

Offen
#89 6 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
326
Forks
104
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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).

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.