ampproject / ampproject/amphtml
Can't set RTL on input nor amp-autocomplete or form
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
## What's the issue?
An input field/form/amp-complete should have the ability to set the dir property to change direction from LTR to RTL.
Also, both the cursor and text are aligned left not right.
## How do we reproduce the issue?
```
`}
/>
```
## What browsers are affected?
All browsers
## Which AMP version is affected?
2008220050001
## Update
I was able to fix this issue by this:
amp-autocomplete > input,
amp-autocomplete > textarea {
font-size: large !important;
direction: rtl !important;
font-weight: 500 !important;
padding: 0 14px 0 14px !important;
}
Contributor guide
Research direction
Start at the amp-autocomplete entry point and reproduce the provided form with dir="rtl" on the form and input. Trace how direction is applied to the input and autocomplete, then verify that RTL text and the cursor align right while LTR behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, internationalization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100