Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directionality is not implemented for dir="auto" #10186

Closed
philip-firstorder opened this issue Feb 28, 2018 · 2 comments · Fixed by #23906
Closed

Directionality is not implemented for dir="auto" #10186

philip-firstorder opened this issue Feb 28, 2018 · 2 comments · Fixed by #23906
Labels
area: cdk/bidi feature This issue represents a new feature or feature request rather than a bug or bug fix P2 The issue is important to a large percentage of users, with a workaround

Comments

@philip-firstorder
Copy link

Bug, feature request, or proposal:

Need to implement auto directionality so that the direction can be determined by the text language.
screen shot 2018-02-28 at 12 18 32

What is the expected behavior?

  • sushi text should be aligned to the left because dir="auto is used on the input
  • Leave a comment placeholder should align to the left because dir="auto" was used on its entire form-field, which would include labels, errors, hints, icon etc.

What is the current behavior?

All controls and values inherit the dir="rtl" value from the container form.

What are the steps to reproduce?

https://stackblitz.com/edit/angular-pvwfjq?file=app/input-overview-example.html

What is the use-case or motivation for changing an existing behavior?

To implement native dir="auto".

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

"@angular/cdk": "^5.2.3",
"@angular/material": "^5.2.3",

Is there anything else we should know?

@crisbeto
Copy link
Member

We've got a TODO for it here. The issue is that in order for us to know what the value is, we have to do a getComputedStyle call which can be expensive.

@jelbourn jelbourn added feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions labels Mar 1, 2018
@crisbeto crisbeto added has pr P2 The issue is important to a large percentage of users, with a workaround and removed P4 A relatively minor issue that is not relevant to core functions labels Nov 5, 2021
crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 5, 2021
Adds support for the `auto` value of the `dir` attribute. The value gets resolved to `ltr` or `rtl` based on browser's locale.

Fixes angular#10186.
crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 5, 2021
Adds support for the `auto` value of the `dir` attribute. The value gets resolved to `ltr` or `rtl` based on browser's locale.

Fixes angular#10186.
crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 5, 2021
Adds support for the `auto` value of the `dir` attribute. The value gets resolved to `ltr` or `rtl` based on browser's locale.

Fixes angular#10186.
mmalerba pushed a commit that referenced this issue Nov 15, 2021
Adds support for the `auto` value of the `dir` attribute. The value gets resolved to `ltr` or `rtl` based on browser's locale.

Fixes #10186.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 16, 2021
forsti0506 pushed a commit to forsti0506/components that referenced this issue Apr 3, 2022
Adds support for the `auto` value of the `dir` attribute. The value gets resolved to `ltr` or `rtl` based on browser's locale.

Fixes angular#10186.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: cdk/bidi feature This issue represents a new feature or feature request rather than a bug or bug fix P2 The issue is important to a large percentage of users, with a workaround
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants