Fix entering username manually

This commit is contained in:
varjolintu 2018-09-05 10:54:12 +03:00 committed by Jonathan White
parent 4082479fbc
commit 45a00b851d

View file

@ -158,7 +158,12 @@ cipAutocomplete.onBlur = function() {
else {
const fieldId = cipFields.prepareId(jQuery(this).attr('data-cip-id'));
const fields = cipFields.getCombination('username', fieldId);
if (_f(fields.password) && _f(fields.password).data('unchanged') !== true && jQuery(this).val() !== '' && _detectedFields > 1) {
const fieldValue = jQuery(this).val();
// Check if the manually inserted value is one of the retrieved credentials
let fieldFound = cipAutocomplete.elements.some(e => e.value === fieldValue);
if (_f(fields.password) && _f(fields.password).data('unchanged') !== true && fieldFound && _detectedFields > 1) {
cip.fillInCredentials(fields, true, true);
}
}