CDK ScrollingModule: scrollToIndex() smooth behavior for all browsers
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
#### Bug, feature request, or proposal:
Feature request
#### What is the expected behavior?
Ability to scroll to index smoothly using `viewPort.scrollToIndex(currIndex, 'smooth')` on all browsers
#### What is the current behavior?
It works on _Chrome_ and _Firefox_ but it doesn't work on _Edge_ and _Safari_
#### What is the use-case or motivation for changing an existing behavior?
Currently, there is no way for the developer to get a cross-browser smooth scrolling with the CDK Virtual Scroll component
Even if the developer has to develop his own smooth scroll function, then he has to get the scroll offset of the target item, which is not possible with the current API
The only available function for measuring the scroll offset is `viewPort.measureScrollOffset('start')` which return the offset of the view, but there is no function to measure the scroll offset of a specific item
We either need `viewPort.measureIndexOffset(index)` function to develop it or a built-in cross-browser smooth scroll feature
In my case I am using the **ScrollingModule** to develop a carousel but the smooth scroll does not work on mobile browsers, Safari and Edge

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
CDK: **7.0.0-beta.1**
Guía de contribución
Línea de trabajo
Empieza inspeccionando el CDK ScrollingModule y su API de virtual-scroll, especialmente scrollToIndex() y measureScrollOffset(). Compara el comportamiento de smooth scrolling informado en Chrome, Firefox, Edge y Safari. Se considera completado cuando el smooth scrolling entre navegadores funciona mediante scrollToIndex() o la API expone el offset de desplazamiento del índice objetivo para una solución alternativa fiable.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, typescript
- Área
- frontend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 25/100