www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 66bfaaae13ba8590cb542b9ecafb4b232a5a201d
parent cd39b5d0e4496a5a9f9f31c27b6357a8d13976bf
Author: Dan Stillman <dstillman@zotero.org>
Date:   Thu, 10 May 2012 18:55:17 -0400

Fix sorting of autocomplete tags dropdown (since Fx9 or so)

Diffstat:
Mcomponents/zotero-autocomplete.js | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/components/zotero-autocomplete.js b/components/zotero-autocomplete.js @@ -90,7 +90,7 @@ ZoteroAutoComplete.prototype.startSearch = function(searchString, searchParam, p var resultsCallback = function (results) { var collation = self._zotero.getLocaleCollation(); results.sort(function(a, b) { - return collation.compareString(1, a, b); + return collation.compareString(1, a.val, b.val); }); } break; @@ -208,6 +208,11 @@ ZoteroAutoComplete.prototype.startSearch = function(searchString, searchParam, p // Disable asynchronous until we figure out the hangs if (true) { var rows = this._zotero.DB.query(sql, sqlParams); + + if (resultsCallback) { + resultsCallback(rows); + } + var results = []; var comments = []; for each(var row in rows) {