Comment 70 for bug 610915

Revision history for this message
In , Mozilla-e (mozilla-e) wrote :

I am pretty sure I have tried everything, including clicking out of the field, when I first got the problem. It was impossible.
But that was in version 5.0. I didn't retry every option with every new version.
I checked and indeed, it is now possible to save user 'User' with password 'p' and user 'user' with password 'ppp'.

Now how can I recall the password for user? If I press 'u' and select 'user' from the dropdown, it fills in 'User'. If I type 'user' and I tab out of the field, it gets converted to 'User'. In both cases the password is 'p'. If I type 'user' and click out of the field, it remains 'user' but there is no autocomplete.

The only thing you need to do to make me happy, and I am sure it is a small fix is:

When recalling the password, I imagine the code something like:
for each stored user/password {
  if( form user == stored user ignoring case ){
     set form user = stored user
     set form password = stored password
     break;
  }
}

The fix is to search first for an exact match, and if it fails, search for a match ignoring case
found = false;
for each stored user/password {
  if( form user == stored user ){
     set form password = stored password
     found = true;
     break;
  }
}
if( !found ){
  for each stored user/password {
    if( form user == stored user, ignoring case ){
      set form user = stored user
      set form password = stored password
      break;
    }
  }
}

I really don't know who can argue against this being a nicer behavior.