Bug 1442303 - The arrow for sort is missing in Exceptions dialogues r=johannh draft
authorTrisha Gupta <guptatrisha97@gmail.com>
Fri, 25 May 2018 22:53:43 +0800
changeset 799913 deb07b78e61ecfc4554ba7257dbfc18f9e4b1ec2
parent 799792 bf4762f10b8d3076d6862e88ca61f90271291508
push id111200
push userbmo:guptatrisha97@gmail.com
push dateFri, 25 May 2018 15:21:22 +0000
reviewersjohannh
bugs1442303
milestone62.0a1
Bug 1442303 - The arrow for sort is missing in Exceptions dialogues r=johannh MozReview-Commit-ID: CntCTeVC91U
browser/components/preferences/permissions.js
--- a/browser/components/preferences/permissions.js
+++ b/browser/components/preferences/permissions.js
@@ -380,16 +380,21 @@ var gPermissionManager = {
     this._lastPermissionSortAscending = gTreeUtils.sort(this._tree,
                                                         this._view,
                                                         this._permissions,
                                                         aColumn,
                                                         this._permissionsComparator,
                                                         this._lastPermissionSortColumn,
                                                         this._lastPermissionSortAscending);
     this._lastPermissionSortColumn = aColumn;
+    let sortDirection = this._lastPermissionSortAscending ? "descending" : "ascending";
+    let cols = document.querySelectorAll("treecol");
+    cols.forEach(c => c.removeAttribute("sortDirection"));
+    let column = document.querySelector(`treecol[data-field-name=${aColumn}]`);
+    column.setAttribute("sortDirection", sortDirection);
   },
 
   onApplyChanges() {
     // Stop observing permission changes since we are about
     // to write out the pending adds/deletes and don't need
     // to update the UI
     this.uninit();