adopted-ember-addons / adopted-ember-addons/ember-collection

Remember the scroll position doesn't always work.

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

Description

If the width/height is not known in advance (e.g.: width is 80% of the parent element) and if the layout needs to know these values to determine the sizes of the items (e.g: a layout where each item is a square and has ’n’ columns), then specifying a scroll position doesn't work.
This is due to the fact that ember-native-scrollable is inserted into the dom before its parent ember-collection. So, the first time when the layout.contentSize is called, the clientWidth and clientHeight is not known. Therefor applying the saved scroll position has no effect

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start by tracing how ember-native-scrollable is inserted relative to its parent ember-collection, then inspect the first layout.contentSize call and the saved-scroll-position handling. Reproduce the case with dimensions determined by the parent and a square-item layout with n columns; done means the saved scroll position is applied after clientWidth and clientHeight are available.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript
Domaine
frontend
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

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