Bug 125842 - Input type=search|color doesn't respect dir=RTL
Summary: Input type=search|color doesn't respect dir=RTL
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-17 00:00 PST by Ryosuke Niwa
Modified: 2023-12-18 01:24 PST (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2013-12-17 00:00:52 PST
https://code.google.com/p/chromium/issues/detail?id=232333

Steps to reproduce the problem:
New HTML input elements fails on working (to be flipped) on RTL pages. 

Input type="search":
data:text/html,<input type="search" value="LTR"><br/><input type="search" value="RTL" dir="RTL">

Input type="search" results:
data:text/html,<input type="search" value="LTR" results><br/><input type="search" value="RTL" results dir="RTL">

Input type="date":
data:text/html,<input type="date"><br/><input type="date" dir="RTL">

Input type="color":
data:text/html,<input type="color" list="color-datalist" dir="RTL">

What is the expected behavior?
Flipping UI elements is expected, same other input elements like type="number":
data:text/html,<input type="number" value="1"><br/><input type="number" value="1" style="direction: rtl">
Comment 1 Ryosuke Niwa 2013-12-17 00:01:11 PST
There has been some attempts to fix this problem on Blink but they have all been reverted.
Comment 2 Ahmad Saleem 2023-09-02 06:12:52 PDT
This one is strange:

data:text/html,<input type="date"><br/><input type="date" dir="RTL">

^ Chrome show dd/mm/yyyy for both irrespective of LTR or RTL and show 'calendar' picker icon on right side. While Firefox do move icon but keep placeholder 'dd/mm/yyyy' same.

In case of Safari Technology Preview 177, we switch 'dd/mm/yyyy' with 'yyyy/mm/dd' for RTL.

I think in other cases, we are respecting 'RTL' and matching other browsers.

@Aditya & @Ryosuke - any input?
Comment 3 Anne van Kesteren 2023-12-18 01:24:13 PST
These all look correct to me.