From 78618ff88ba177ed2dd7ceedd818816c7a111697 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 19 Mar 2013 06:16:11 -0400 Subject: [PATCH] Fix collections-containing-an-item highlighting in Fx22+ --- .../zotero/xpcom/collectionTreeView.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/xpcom/collectionTreeView.js b/chrome/content/zotero/xpcom/collectionTreeView.js index cce85c05d4..e67ddfc444 100644 --- a/chrome/content/zotero/xpcom/collectionTreeView.js +++ b/chrome/content/zotero/xpcom/collectionTreeView.js @@ -1817,12 +1817,23 @@ Zotero.CollectionTreeView.prototype.isSorted = function() { return false; Zotero.CollectionTreeView.prototype.isEditable = function(row, idx) { return false; } /* Set 'highlighted' property on rows set by setHighlightedRows */ -Zotero.CollectionTreeView.prototype.getRowProperties = function(row, props) { +Zotero.CollectionTreeView.prototype.getRowProperties = function(row, prop) { + var props = []; + if (this._highlightedRows[row]) { - var aServ = Components.classes["@mozilla.org/atom-service;1"]. - getService(Components.interfaces.nsIAtomService); - props.AppendElement(aServ.getAtom("highlighted")); + // <=Fx21 + if (prop) { + var aServ = Components.classes["@mozilla.org/atom-service;1"]. + getService(Components.interfaces.nsIAtomService); + prop.AppendElement(aServ.getAtom("highlighted")); + } + // Fx22+ + else { + props.push("highlighted"); + } } + + return props.join(" "); } Zotero.CollectionTreeView.prototype.getColumnProperties = function(col, prop) { }