angular-ui / angular-ui/ui-scroll

$window.scrollTo() not handled correctly

Aperta
#89 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
326
Fork
104
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.