mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-23 21:31:29 +01:00
autofill fixes for cards
This commit is contained in:
parent
2749216a34
commit
4b3ab983cd
2
jslib
2
jslib
@ -1 +1 @@
|
||||
Subproject commit 9bc7459eacb55a234da8dd8aa71c059a4cd3e1ee
|
||||
Subproject commit 76ece834d1d18e9cca71bb3c182d2284dae80958
|
@ -20,6 +20,8 @@ import {
|
||||
const CardAttributes: string[] = ['autoCompleteType', 'data-stripe', 'htmlName', 'htmlID', 'label-tag',
|
||||
'placeholder', 'label-left', 'label-top'];
|
||||
|
||||
const CardAttributesExtended: string[] = [...CardAttributes, 'label-right'];
|
||||
|
||||
const IdentityAttributes: string[] = ['autoCompleteType', 'data-stripe', 'htmlName', 'htmlID', 'label-tag',
|
||||
'placeholder', 'label-left', 'label-top'];
|
||||
|
||||
@ -550,7 +552,7 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
}
|
||||
|
||||
let doesContain = false;
|
||||
CardAttributes.forEach((attr) => {
|
||||
CardAttributesExtended.forEach((attr) => {
|
||||
if (doesContain || !field.hasOwnProperty(attr) || !field[attr]) {
|
||||
return;
|
||||
}
|
||||
@ -780,7 +782,7 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
for (let i = 0; i < field.selectInfo.options.length; i++) {
|
||||
const option = field.selectInfo.options[i];
|
||||
for (let j = 0; j < option.length; j++) {
|
||||
if (option[j].toLowerCase() === dataValue.toLowerCase()) {
|
||||
if (this.hasValue(option[j]) && option[j].toLowerCase() === dataValue.toLowerCase()) {
|
||||
doFill = true;
|
||||
if (option.length > 1) {
|
||||
dataValue = option[1];
|
||||
|
Loading…
Reference in New Issue
Block a user