angular-ui / angular-ui/ui-scroll

"Preserves the scroll on refresh" does not ensure first item visibility

Ouverte
#117 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
326
Forks
104
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

When the first item in list is partially visible, refreshing the page causes scrolling to the first item entirely visible.
For example, when using [https://rawgit.com/angular-ui/ui-scroll/master/demo/persistentScroll/persistentScroll.html](url), we can make "Item 2" as the first item (not entirely visible):
![scroll1](https://cloud.githubusercontent.com/assets/22038861/18474517/b27b20d8-79c2-11e6-8d12-3f0e3ceac291.png)
Then refreshing the page, makes "Item 3" the first item:
![scroll2](https://cloud.githubusercontent.com/assets/22038861/18474524/c4280f12-79c2-11e6-9053-f63295ad7fef.png)
while the expected behavior would be to still see "Item 2" as in:
![scroll3](https://cloud.githubusercontent.com/assets/22038861/18474542/da8f680e-79c2-11e6-87a1-7c6fccd9845d.png)

This is even more important when items in list have a "big height".

Any idea on how to solve this?

Thanks in advance,

Olivier

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.