Set autocomplete to off for all password fields to avoid the double infobar problem during linking.

This commit is contained in:
Chris Karlof 2012-12-17 15:54:43 -08:00
Родитель 22f85ff357
Коммит fd4e783c17
1 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -105,12 +105,18 @@
}
function getPwFields(_inputsList) {
var pwFields = [];
var pwFields = [],
pwField = null;
for (var inputIdx = 0; inputIdx < _inputsList.length; inputIdx++) {
if (_inputsList[inputIdx].type == 'password') {
pwField = _inputsList[inputIdx];
// Setting 'autocomplete' to 'off' will signal to the native
// password manager to ignore this login wrt filling and capturing.
// This solves the "double infobar" problem when linking.
pwField.setAttribute('autocomplete', 'off');
pwFields.push({
idx: inputIdx,
val: _inputsList[inputIdx].value
val: pwField.value
});
}
}