angular / angular/components

getRtlScrollAxisType detects incorrect RtlScrollAxisType for chrome

Ouverte
#28,209 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
area: cdk/scrolling needs investigation P4
Langage dominant
TypeScript
Étoiles
25k
Forks
6.8k
Merge moyen
1 j 8 h
PR mergées (30 j)
91

Description

### Is this a regression?

- [X] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

I recently upgraded to Angular ~16.2.10, and noticed that cdk-virtual-scroll-viewport is not working in RTL mode for horizontal scroll. Initial data is rendered but then on scroll subsequent records are not rendered.

On investigations I came to know that getRtlScrollAxisType is returning 2 (Inverted) instead of 1 (Negated). If I make it return 1 during debug, things start to work fine.

### Reproduction

StackBlitz link: https://stackblitz.com/edit/angular-yehn5j?file=src%2Fapp%2Fcdk-platform-overview-example.html
Steps to reproduce:
Notice that at the bottom of information, getRtlScrollAxisType is 2
![image](https://github.com/angular/components/assets/17024937/4e9b569d-82a9-4d99-b437-d94b9d2faeac)

### Expected Behavior

getRtlScrollAxisType() should return 1 for chrome.

### Actual Behavior

getRtlScrollAxisType() returns 2 for chrome

### Environment

- Angular: ~16.2.10
- CDK/Material: ~16.2.10
- Browser(s): Chrome 119.0.6045.160, Chrome 119.0.6045.200
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 10 Pro

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par localiser getRtlScrollAxisType dans le code de CDK platform ou de scrolling, puis reproduisez l’échec du défilement horizontal RTL à l’aide de l’exemple StackBlitz lié dans Chrome. Vérifiez le type d’axe détecté et confirmez que cdk-virtual-scroll-viewport affiche correctement les enregistrements suivants tout en préservant le comportement dans les autres navigateurs pris en charge.

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

Évaluation

Stack technique
angular, typescript
Domaine
frontend, web-dev
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Clairement spécifiée
Accessibilité débutants
48/100

Recevez les nouvelles issues par e-mail

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