Permalink
Browse files

Set autocomplete to off for all password fields to avoid the double i…

…nfobar problem during linking.
  • Loading branch information...
1 parent 22f85ff commit fd4e783c1775495134f7ccfa1e67919fb18dc675 Chris Karlof committed Dec 17, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 in_content/observer.js
@@ -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
});
}
}

0 comments on commit fd4e783

Please sign in to comment.