Bug 689349 - Don't suggest values for password text boxes (r=mfinkle)

This commit is contained in:
Lucas Rocha 2011-09-28 17:50:19 +01:00
parent f999dc9823
commit 1e6f77f1f2

View File

@ -546,6 +546,9 @@ FormAssistant.prototype = {
_isAutocomplete: function formHelperIsAutocomplete(aElement) {
if (aElement instanceof HTMLInputElement) {
if (aElement.getAttribute("type") == "password")
return false;
let autocomplete = aElement.getAttribute("autocomplete");
let allowedValues = ["off", "false", "disabled"];
if (allowedValues.indexOf(autocomplete) == -1)