Bug 1366620 - Use `unicode-bidi: embed` to fix reversed hebrew placeholders. r=gandalf
authorJessica Jong <jjong@mozilla.com>
Fri, 02 Jun 2017 10:16:22 +0800
changeset 412537 50545ad26ef4d4eaf00a73d62c2abc7f12a2dffa
parent 412536 30c2b38c4a0f3f26eeccc8eaadab09e4fd95028f
child 412538 1e4caa4e405acf1a7de8edca712c49f51eaeb31a
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgandalf
bugs1366620
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1366620 - Use `unicode-bidi: embed` to fix reversed hebrew placeholders. r=gandalf MozReview-Commit-ID: 1tTkps8a96N
toolkit/content/widgets/datetimebox.xml
--- a/toolkit/content/widgets/datetimebox.xml
+++ b/toolkit/content/widgets/datetimebox.xml
@@ -1219,19 +1219,21 @@
             field.setAttribute("rawValue", "");
             // Minimum digits to display, padded with leading 0s.
             field.setAttribute("mindigits", aMinDigits);
             // Maximum length for the field, will be advance to the next field
             // automatically if exceeded.
             field.setAttribute("maxlength", aMaxLength);
 
             if (this.mIsRTL) {
-              // Override the numeric field with "ltr", so that it stays in the
-              // same order even when it's empty (with placeholder).
-              field.style.unicodeBidi = "bidi-override";
+              // Force the direction to be "ltr", so that the field stays in the
+              // same order even when it's empty (with placeholder). By using
+              // "embed", the text inside the element is still displayed based
+              // on its directionality.
+              field.style.unicodeBidi = "embed";
               field.style.direction = "ltr";
             }
           }
 
           return field;
         ]]>
         </body>
       </method>