Bug 1480572, r=adw,felipe
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Wed, 22 Aug 2018 23:48:14 +0100
changeset 831032 7e7cfbc863e6dd839f31c8d1b4cca3c04b254f5c
parent 831031 a5f23c113987a3e682b2445016709bebca8eb264
child 831033 a0883c99c897122286c6e1711cada83d9889e093
push id118868
push userbmo:zjz@zjz.name
push dateFri, 24 Aug 2018 07:04:39 +0000
reviewersadw, felipe
bugs1480572
milestone63.0a1
Bug 1480572, r=adw,felipe
browser/base/content/urlbarBindings.xml
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -584,21 +584,22 @@ file, You can obtain one at http://mozil
           // the first strong directional character, we set the overflow
           // appropriately.
           this.selectionStart = this.selectionEnd = 0;
           window.requestAnimationFrame(() => {
             // Check for re-entrance. On focus change this formatting code is
             // invoked regardless, thus this should be enough.
             if (this._formattingInstance != instance)
               return;
-            let isDomainRTL = window.windowUtils.getDirectionFromText(domain);
+            let directionality = window.windowUtils.getDirectionFromText(domain);
             // In the future, for example in bug 525831, we may add a forceRTL
             // char just after the domain, and in such a case we should not
             // scroll to the left.
-            if (isDomainRTL && value[preDomain.length + domain.length] != "\u200E") {
+            if (directionality == window.windowUtils.DIRECTION_RTL &&
+                value[preDomain.length + domain.length] != "\u200E") {
               this.inputField.scrollLeft = this.inputField.scrollLeftMax;
             }
           });
 
           if (!this._formattingEnabled)
             return;
 
           this.formatScheme(controller.SELECTION_URLSECONDARY);