Open Bug 1426652 Opened 2 years ago Updated 4 months ago

On office.com autofill credit card is not working

Categories

(Toolkit :: Form Autofill, defect, P3)

defect

Tracking

()

REOPENED
mozilla59

People

(Reporter: valentina.ona, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [form autofill:V2][Misc.])

Attachments

(3 files)

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID 20171220220602

[Affected versions]: Nightly 59.0a1
[Affected platforms]: Windows 10 x64

[Steps to reproduce]:

1. Go to office.com and buy something
2. Go to checkout.
3. Double-click on Cardholder Name or Card Number

[Expected results]: The form autofill suggestions are displayed.
[Actual results]: Nothing happened.

[Note]: For more details please see the attachment.
Attached video office.com.webm
[Precondition]: You need to have least a credit card profile saved.
Flags: needinfo?(schung)
Hi Valentina, could you verify if the card holder name field displays address profile dropdown suggestion if you have an address profile in preferences?
Flags: needinfo?(schung) → needinfo?(valentina.ona)
Attached image office bug.png
The cardholder name field doesn't display any dropdown, please see the attached document with the field areas where drop-down doesn't work.
Flags: needinfo?(valentina.ona)
(In reply to ovidiu boca[:Ovidiu] from comment #4)
> Created attachment 8939835 [details]
> office bug.png
> 
> The cardholder name field doesn't display any dropdown, please see the
> attached document with the field areas where drop-down doesn't work.

Ok, It looks like I have to switch to en-US or en-CA to reproduce the same result. For zh-tw it's another issue but I guess we'll create bug once we need to support TW.

This bug is because the expiry date element is button instead of input or select, and we're unable to detect this. The lack of expiry date element will make handler treat this credit card section as invalid section. We can add a workaround that also check if section has expiry date or cardholder name in _isValidCreditCardForm, but please note that filling the expiry date is still not working after this fixing.
Assignee: nobody → schung
I tested the address autofill part on the same page as well. Everything fills in great but the Province fails for the same reason: Actually it's button instead of input. I Will create a new bug for address fill-in part.
Whiteboard: [form autofill: V2] → [form autofill:V2][Misc.]
Comment on attachment 8941343 [details]
Bug 1426652 - Allow the form with non-autocomplete-attr cc-number and cc-name as valid credit card form,

https://reviewboard.mozilla.org/r/211654/#review217438

::: browser/extensions/formautofill/FormAutofillHandler.jsm:124
(Diff revision 1)
>        switch (detail.fieldName) {
>          case "cc-number":
>            hasCCNumber = true;
>            ccNumberReason = detail._reason;
>            break;
> +        case "cc-name":

You need to include "cc-given-name" and "cc-family-name", too.

::: browser/extensions/formautofill/test/unit/test_collectFormFields.js:197
(Diff revision 1)
>        creditCardFieldDetails: [],
>      }],
>      validFieldDetails: [],
>    },
>    {
> -    description: "An invalid credit card form due to non-autocomplete-attr cc-number and omitted cc-exp-*.",
> +    description: "A valid credit card form with non-autocomplete-attr cc-number and cc-name.",

Do we have a test for "an invalid credit card form because only non-autocomplete-attr cc-number is found"?
Attachment #8941343 - Flags: review?(lchang)
Comment on attachment 8941343 [details]
Bug 1426652 - Allow the form with non-autocomplete-attr cc-number and cc-name as valid credit card form,

https://reviewboard.mozilla.org/r/211654/#review217730

::: browser/extensions/formautofill/FormAutofillHandler.jsm:124
(Diff revision 1)
>        switch (detail.fieldName) {
>          case "cc-number":
>            hasCCNumber = true;
>            ccNumberReason = detail._reason;
>            break;
> +        case "cc-name":

I guess `cc-additional-name` should be included as well?

::: browser/extensions/formautofill/test/unit/test_collectFormFields.js:197
(Diff revision 1)
>        creditCardFieldDetails: [],
>      }],
>      validFieldDetails: [],
>    },
>    {
> -    description: "An invalid credit card form due to non-autocomplete-attr cc-number and omitted cc-exp-*.",
> +    description: "A valid credit card form with non-autocomplete-attr cc-number and cc-name.",

Yes we do: https://searchfox.org/mozilla-central/rev/88439dc6c5b02e167032374071cdc697a056efa1/browser/extensions/formautofill/test/unit/test_collectFormFields.js#184-194
(In reply to Steve Chung [:steveck] from comment #9)
> > (In reply to Luke Chang [:lchang] from comment #8)
> > Do we have a test for "an invalid credit card form because only
> > non-autocomplete-attr cc-number is found"?
> 
> Yes we do:
> https://searchfox.org/mozilla-central/rev/
> 88439dc6c5b02e167032374071cdc697a056efa1/browser/extensions/formautofill/
> test/unit/test_collectFormFields.js#184-194

I meant we need a test for an invalid form that only contains "cc-number" without @autcomplete. e.g.

```js
<form>
  <input id="cc-number">
</form>
```
Flags: needinfo?(schung)
Added. Sorry I'm not sure why I misunderstood the comment yesterday...
Flags: needinfo?(schung)
Comment on attachment 8941343 [details]
Bug 1426652 - Allow the form with non-autocomplete-attr cc-number and cc-name as valid credit card form,

https://reviewboard.mozilla.org/r/211654/#review218068

Thanks.
Attachment #8941343 - Flags: review?(lchang) → review+
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again.

hg error in cmd: hg rebase -s 3cdf5233f0e2 -d 4a9f600f5658: rebasing 442063:3cdf5233f0e2 "Bug 1426652 - Allow the form with non-autocomplete-attr cc-number and cc-name as valid credit card form, r=lchang" (tip)
merging browser/extensions/formautofill/FormAutofillHandler.jsm
merging browser/extensions/formautofill/test/unit/test_collectFormFields.js
warning: conflicts while merging browser/extensions/formautofill/FormAutofillHandler.jsm! (edit, then use 'hg resolve --mark')
warning: conflicts while merging browser/extensions/formautofill/test/unit/test_collectFormFields.js! (edit, then use 'hg resolve --mark')
unresolved conflicts (see hg resolve, then hg rebase --continue)
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again.

hg error in cmd: hg rebase -s 3cdf5233f0e2 -d 022ee7de0098: rebasing 442140:3cdf5233f0e2 "Bug 1426652 - Allow the form with non-autocomplete-attr cc-number and cc-name as valid credit card form, r=lchang" (tip)
merging browser/extensions/formautofill/FormAutofillHandler.jsm
merging browser/extensions/formautofill/test/unit/test_collectFormFields.js
warning: conflicts while merging browser/extensions/formautofill/FormAutofillHandler.jsm! (edit, then use 'hg resolve --mark')
warning: conflicts while merging browser/extensions/formautofill/test/unit/test_collectFormFields.js! (edit, then use 'hg resolve --mark')
unresolved conflicts (see hg resolve, then hg rebase --continue)
Sorry, your patch got bitrotted by other changes and fails to apply. Please update it so it can be landed. Thank you.
Flags: needinfo?(schung)
Keywords: checkin-needed
Patch rebased, thanks.
Flags: needinfo?(schung)
Keywords: checkin-needed
Pushed by ncsoregi@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c6f4e32c749b
Allow the form with non-autocomplete-attr cc-number and cc-name as valid credit card form, r=lchang
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/c6f4e32c749b
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Hi Valentina, can you help to verify this bug? Please notice that we will fill in card holder name and card number only. Expired date will not be fill-in since it's button type and should not be auto fill-in by web standard.
Flags: needinfo?(valentina.ona)
I tested this on Mac OS X 10.13, Windows 10 x64 with Nightly 59.0a1(2018-01-16) and I still can reproduce this issue, the drop down for the credit card doesn't work.
I verified this issue using Latest Nightly 59.0a1 on Windows 10 x64 and it's reproducible. The autofill is not working.
Flags: needinfo?(valentina.ona)
Per comment 23 & comment 24.
Flags: needinfo?(schung)
Flags: needinfo?(steveck324)
I verified this issue using Latest Nightly 60.0a1 (2018.02.09) and 59.0b8 on Windows 8.1 x64 and Mac OS 10.13.3 it's reproducible. The form autofill is not working on office.com.
Flags: needinfo?(ncsoregi)
Flags: needinfo?(vchen)
Flags: needinfo?(ncsoregi)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Clearing need-info and putting this back in triage.

Assignee: steveck324 → nobody
Flags: needinfo?(vchen)
Priority: P3 → --
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.