ampproject / ampproject/amphtml

Can't set RTL on input nor amp-autocomplete or form

Open
#30,135 2 comments 0 reactions 0 assignees View on GitHub
Component: amp-autocomplete Component: amp-form P2: Soon Stale Type: Bug WG: components
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?

```




{{ name }}

`}
/>


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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.