Closed
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already include this feature request, without success.
Describe the Feature Request
Adding dir
to a textarea or text input. (see PR #30102 )
Describe the Use Case
It fixes the cursor position when you type in RTL languages on phones (tested on iPhone)
Let's say you have a native textarea without dir
attribute (default value is ltr
):
<textarea></textarea>
when you type using RTL characters, your cursor position remains at the beginning (because of the default LTR value, it knows that the cursor should be at the right side of the text, but in RTL languages, it's wrong and should be at the left side):
We can fix it using dir
attribute on it:
<textarea dir="auto"></textarea>
Result:
Describe Preferred Solution
Adding dir
to a textarea or text input as an inherited attribute.
Describe Alternatives
No response
Related Code
I've created PR #30102 to add dir
attribute as an inherited attr to textarea and text inputs.
Additional Information
No response