Closed Bug 1366620 Opened 3 years ago Closed 3 years ago

Reversed "Day, Month, Year" Hebrew text in <input type=date>

Categories

(Core :: Layout: Form Controls, defect)

defect
Not set

Tracking

()

VERIFIED FIXED
mozilla55
Tracking Status
firefox55 --- verified

People

(Reporter: itiel_yn8, Assigned: jessica)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached image Reverted text
See attached screenshot, taken from latest Nightly.

STR:
1. Install latest Nightly, Hebrew locale
2. Open a new tab, enter data:text/html,<input type=date>

The Hebrew text there is inverted, so instead of "הנש.שדוח.םוי", there should be "שנה.חודש.יום".
Summary: Reverted "Day, Month, Year" Hebrew text in <input type=date> → Reversed "Day, Month, Year" Hebrew text in <input type=date>
Jessica, seems like the component order is correct, but tokens have the wrong directionality?
Flags: needinfo?(jjong)
Hi ItielMaN, can I know the your locale code, since using `he` as locale, the date is displayed with arabic numbers.
`console.log(new Intl.DateTimeFormat('he').format(Date.now()));` gives `24.5.2017`.
And, have you tried it on Chrome?
Thanks.
Flags: needinfo?(jjong) → needinfo?(itiel_yn8)
(In reply to Jessica Jong [:jessica] from comment #2)
> Hi ItielMaN, can I know the your locale code, since using `he` as locale,
> the date is displayed with arabic numbers.
> `console.log(new Intl.DateTimeFormat('he').format(Date.now()));` gives
> `24.5.2017`.
> And, have you tried it on Chrome?
> Thanks.

The dates actually look good, I was referring to the placeholders- the actual text "Day.Month,Year" (in Hebrew it should be "שנה.חודש.יום") before the user select a date.
Currently it's like you'd see the text in English as "yaD.htnoM.raeY".
Flags: needinfo?(itiel_yn8)
Thanks ItielMaN for the clarification. I think this is because we use `unicode-bidi: override` with direction `ltr`. Maybe we should use `unicode-bidi: embed` instead.
Blocks: datetime-bugs
No longer blocks: datetime
Why is the `field` direction: ltr instead of being picked based on the script direction?
Flags: needinfo?(jjong)
(In reply to Zibi Braniecki [:gandalf][:zibi] from comment #7)
> Why is the `field` direction: ltr instead of being picked based on the
> script direction?

Numbers are LTR, we just force it to be LTR so that the order of the fields doesn't change when the field is empty (with placeholder), otherwise, you'll notice that the order of the fields keeps changing while you enter values in the fields.
Opening an additional level of embedding (by using `embed`), will still make the placeholder text displayed based on its direction.
Flags: needinfo?(jjong)
Comment on attachment 8871578 [details]
Bug 1366620 - Use `unicode-bidi: embed` to fix reversed hebrew placeholders.

rubberstamping r+ then. The code looks good and I trust :jessica's logic. :)
Attachment #8871578 - Flags: review?(gandalf) → review+
(In reply to Zibi Braniecki [:gandalf][:zibi] from comment #9)
> Comment on attachment 8871578 [details]
> Bug 1366620 - Use `unicode-bidi: embed` to fix reversed hebrew placeholders.
> 
> rubberstamping r+ then. The code looks good and I trust :jessica's logic. :)

Thanks zibi. I have to say I'm still very unfamiliar with all this bidi thing, but this seems to give the right result. :)
Date and time inputs are going to be enabled by default on Nightly this week, so hopefully, we'll have more testers to find out if there is any other issue.
Comment on attachment 8871578 [details]
Bug 1366620 - Use `unicode-bidi: embed` to fix reversed hebrew placeholders.

Carrying r+, since I only updated the comment.
Attachment #8871578 - Flags: review?(gandalf) → review+
need r+ also on mozreview so that we can use autoland
Flags: needinfo?(jjong)
Keywords: checkin-needed
Comment on attachment 8871578 [details]
Bug 1366620 - Use `unicode-bidi: embed` to fix reversed hebrew placeholders.

https://reviewboard.mozilla.org/r/143058/#review149132
Attachment #8871578 - Flags: review+
Thanks :zibi. Forwarding ni to :Tomcat.
Flags: needinfo?(jjong) → needinfo?(cbook)
thanks should be pushed now :)
Flags: needinfo?(cbook)
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/50545ad26ef4
Use `unicode-bidi: embed` to fix reversed hebrew placeholders. r=gandalf
https://hg.mozilla.org/mozilla-central/rev/50545ad26ef4
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Verified fixed on the latest Nightly 55.0a1 (2017-06-07) on Windows 10 x64, Ubuntu 16.04 x64 and Mac OS X 10.12.
Status: RESOLVED → VERIFIED
Assignee: nobody → jessi3py
You need to log in before you can comment on or make changes to this bug.