angular / angular/components

bug MatFormFields: Force LTR in RTL page

Abierto
#26,778 1 comentario 0 reacciones 0 asignados Ver en GitHub
area: material/form-field P3
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
angular
Área
frontend, internationalization
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.