Noticed when testing in Tor Browser. ## Steps to reproduce Using Firefox with "ar" locale: 1. In "about:config" set `privacy.spoof_english` to `2`. 2. Restart. 3. Visit https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local#basic_uses_of_datetime-local ## Result From left to right, the unfilled datetime input shows: picker; AM/PM input; date input; time input. After entering an hour, the layout switches to: picker; date input; time input; AM/PM input. ## Expect The order and direction should remain the same and follow the spoofed en-US direction: date input; time input; AM/PM input; picker. Note, the fact that the placeholders use "ar" rather an "en-US" is a separate issue, which should have a bug on bugzilla soon. ## Cause I think the problem is that datetime input [uses the app locale direction](https://searchfox.org/mozilla-central/rev/9bb5d5f55da6cc7163dd93825c25609b769822f9/toolkit/content/widgets/datetimebox.js#145) to set the "dir" attribute. Rather than using the direction associated with the `mLocales[0]`.
Bug 1880097 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Noticed when testing in Tor Browser. ## Steps to reproduce Using Firefox with "ar" locale: 1. In "about:config" set `privacy.spoof_english` to `2`. 2. Restart. 3. Visit https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local#basic_uses_of_datetime-local ## Result From left to right, the unfilled datetime input shows: picker; AM/PM input; date input; time input. After entering an hour, the layout switches to: picker; date input; time input; AM/PM input. ## Expect The order and direction should remain the same and follow the spoofed en-US direction: date input; time input; AM/PM input; picker. Note, the fact that the placeholders use "ar" rather an "en-US" is a separate issue: bug#1880108. ## Cause I think the problem is that datetime input [uses the app locale direction](https://searchfox.org/mozilla-central/rev/9bb5d5f55da6cc7163dd93825c25609b769822f9/toolkit/content/widgets/datetimebox.js#145) to set the "dir" attribute. Rather than using the direction associated with the `mLocales[0]`.