Bug 107957 - Fixed sorting order for password manager autocomplete. r=MattN
authorBernardo P. Rittmeyer <bernardo@rittme.com>
Mon, 03 Aug 2015 15:16:08 -0700
changeset 287784 12de634ab37b9ce625f99d9f780c90ef2bdf405e
parent 287719 e0973a29cb1c5753c555c59b679b077abfe6cc65
child 287785 c67439c13ec0316f260b60037ee0130ab54995b6
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMattN
bugs107957
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 107957 - Fixed sorting order for password manager autocomplete. r=MattN
toolkit/components/passwordmgr/LoginManagerContent.jsm
--- a/toolkit/components/passwordmgr/LoginManagerContent.jsm
+++ b/toolkit/components/passwordmgr/LoginManagerContent.jsm
@@ -1065,17 +1065,17 @@ var LoginUtils = {
 function UserAutoCompleteResult (aSearchString, matchingLogins) {
   function loginSort(a,b) {
     var userA = a.username.toLowerCase();
     var userB = b.username.toLowerCase();
 
     if (userA < userB)
       return -1;
 
-    if (userB > userA)
+    if (userA > userB)
       return  1;
 
     return 0;
   };
 
   this.searchString = aSearchString;
   this.logins = matchingLogins.sort(loginSort);
   this.matchCount = matchingLogins.length;