Skip to content

fix(react-components/text-field): placeholder direction should be RTL when the textfield is empty #496

Closed
@malikarami

Description

@malikarami

Bug Description
When the textfield is used with type set to tel, the placeholder direction is ltr where it should be rtl when the value is empty.

To Reproduce
Render the following textfield in your application:

import { TextField } from '@tapsioss/react-components/TextField';


<TextField
            placeholder="شماره همراه"
            type="tel"
            maxLength={11}
            value={phoneNumber}
            onChange={(e) => setPhoneNumber((e.target as HTMLInputElement).value)}
          />

Expected behavior
The placeholder should be ltr when the field is empty.

Screenshots

Image Image

Desktop (please complete the following information):

  • OS: [e.g. iOS]: MacOS 14.4.1
  • Browser [e.g. chrome, safari]: Chrome
  • Version [e.g. 22]: react-components 0.17.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions