Bug 1442303 - The arrow for sort is missing in Exceptions dialogues r=johannh
MozReview-Commit-ID: CntCTeVC91U
--- 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();