1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

autofill fixes #20

This commit is contained in:
Kyle Spearrin
2016-11-11 22:40:09 -05:00
parent 0233a5b7b8
commit dfba31121c
2 changed files with 7 additions and 5 deletions

View File

@@ -25,7 +25,7 @@ function initAutofill() {
username = null;
for (var i = 0; i < pageDetails.fields.length; i++) {
if (pageDetails.fields[i].type === 'password') {
if (pageDetails.fields[i].type === 'password' && pageDetails.fields[i].viewable) {
passwordFields.push(pageDetails.fields[i]);
}
}
@@ -45,7 +45,7 @@ function initAutofill() {
if (fillUsername) {
for (var j = 0; j < pageDetails.fields.length; j++) {
f = pageDetails.fields[j];
if (f.form === pf.form && (f.type === 'text' || f.type === 'email' || f.type === 'tel')
if (f.form === pf.form && f.viewable && (f.type === 'text' || f.type === 'email' || f.type === 'tel')
&& f.elementNumber < pf.elementNumber) {
username = f;
}
@@ -73,7 +73,7 @@ function initAutofill() {
break;
}
if (f.type === 'text' || f.type === 'email' || f.type === 'tel') {
if (f.viewable && (f.type === 'text' || f.type === 'email' || f.type === 'tel')) {
username = f;
}
}