Merge pull request #554 from keepassxreboot/fix/fill_option_value

Fix filling option value
This commit is contained in:
Sami Vänttinen 2019-05-27 13:53:09 +03:00 committed by GitHub
commit 8fe6eec6c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1145,7 +1145,7 @@ kpxc.setValue = function(field, value) {
value = value.toLowerCase().trim();
const options = field.querySelectorAll('option');
for (const o of options) {
if (o.test().toLowerCase().trim() === value) {
if (o.textContent.toLowerCase().trim() === value) {
kpxc.setValueWithChange(field, o.value);
return false;
}