Bug 1366620 - Use `unicode-bidi: embed` to fix reversed hebrew placeholders. r?gandalf draft
authorJessica Jong <jjong@mozilla.com>
Fri, 02 Jun 2017 10:16:22 +0800
changeset 588060 c7672500a2371c64ffbef2eadfbd9bf3afb99722
parent 588052 aeb3d0ca558f034cbef1c5a68bd07dd738611494
child 631444 b48de7907fe61408435be327be68aa8c0ca2e59a
push id61891
push userjjong@mozilla.com
push dateFri, 02 Jun 2017 03:12:27 +0000
reviewersgandalf
bugs1366620
milestone55.0a1
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>