angular / angular/components

bug MatFormFields: Force LTR in RTL page

Aperta
#26,778 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
area: material/form-field P3
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

### 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

The current style behavior for form fields that if there is any RTL direction previous to it, it will be targeted.
since the LTR is the default case it wont be an issue to force the component to be RTL, however in RTL page you cant force LTR direction to MatFormFields.

### Reproduction

Steps to reproduce:
1. set dir rtl globally in index.html
2. set dir ltr to any form filed
https://stackblitz.com/edit/components-issue-2e8dha?file=src/app/example-component.html

### Expected Behavior

to be able to change direction of formfield

### Actual Behavior

formfield style stays rtl with direction ltr on in

### Environment

- Angular: 15
- CDK/Material: 15
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Ubuntu

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start with the linked StackBlitz reproduction, checking the global direction in index.html and the form field markup in src/app/example-component.html. Trace how the form field responds to global RTL and local LTR settings. Done means a form field with dir="ltr" renders LTR even when the page direction is RTL.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular
Ambito
frontend, internationalization
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.