angular / angular/components

Dir 'rtl' not working in vertical orientation

Open
#24,244 8 comments 0 reactions 0 assignees View on GitHub
area: cdk/scrolling P3
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

### Is this a regression?

- [ ] 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'm using `cdk-virtual-scroll-viewport` and I'm changing dynamically by binding its `dir` property from `ltr` to `rtl`, to obtain a bottom to top scoller. I can see the change in the html, but visually it has no effect.

### Reproduction

Steps to reproduce:
1. cdk-virtual-scroll-viewport with vertical orientation and rtl dir
2.

### Expected Behavior

Vertical scroller, oriented from bottom to top

### Actual Behavior

Vertical scroller, oriented from top to bottom, no change vs. vertical orientation and ltr dir.

### Environment

- Angular: 12.0.4
- CDK/Material: 12.0.4
- Browser(s): Chrome Version 97.0.4692.71 (Official Build) (64-bit)
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 10 64-bit

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with cdk-virtual-scroll-viewport in vertical orientation, binding its dir property from ltr to rtl. Trace how the viewport handles direction changes and verify the expected bottom-to-top visual orientation; the issue is done when the dynamic change takes effect instead of remaining top-to-bottom.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.