Bug 1073692 - Display each search suggestion row with the correct text direction on about:home/about:newtab. r=ehsan
authorDrew Willcoxon <adw@mozilla.com>
Sat, 11 Oct 2014 19:07:52 -0700
changeset 209992 41085ca48e5ad955fd7b45b808fa879603ba2f22
parent 209991 8c0b4dfe1da4456b21cbd2bdc685154f6b549035
child 209993 1278a4bf957cd5eae5c74e7eafff39ab128b7ac1
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersehsan
bugs1073692
milestone35.0a1
Bug 1073692 - Display each search suggestion row with the correct text direction on about:home/about:newtab. r=ehsan
browser/base/content/searchSuggestionUI.js
--- a/browser/base/content/searchSuggestionUI.js
+++ b/browser/base/content/searchSuggestionUI.js
@@ -296,16 +296,17 @@ SearchSuggestionUIController.prototype =
   _speculativeConnect: function () {
     if (this.engineName) {
       this._sendMsg("SpeculativeConnect", this.engineName);
     }
   },
 
   _makeTableRow: function (type, suggestionStr, currentRow, searchWords) {
     let row = document.createElementNS(HTML_NS, "tr");
+    row.dir = "auto";
     row.classList.add("searchSuggestionRow");
     row.classList.add(type);
     row.setAttribute("role", "presentation");
     row.addEventListener("mousemove", this);
     row.addEventListener("mousedown", this);
 
     let entry = document.createElementNS(HTML_NS, "td");
     entry.classList.add("searchSuggestionEntry");
@@ -360,17 +361,16 @@ SearchSuggestionUIController.prototype =
     }
     return row.rowIndex;
   },
 
   _makeTable: function (id) {
     this._table = document.createElementNS(HTML_NS, "table");
     this._table.id = id;
     this._table.hidden = true;
-    this._table.dir = "auto";
     this._table.classList.add("searchSuggestionTable");
     this._table.setAttribute("role", "listbox");
     return this._table;
   },
 
   _sendMsg: function (type, data=null) {
     dispatchEvent(new CustomEvent("ContentSearchClient", {
       detail: {