Closed Bug 1428269 Opened 7 years ago Closed 4 years ago

On walmart.ca, credit card autofill doesn't work

Categories

(Toolkit :: Form Autofill, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla80
Tracking Status
firefox59 --- wontfix
firefox80 --- verified

People

(Reporter: lchang, Assigned: abr)

References

(Depends on 2 open bugs, Blocks 1 open bug, )

Details

(Whiteboard: [cc-autofill-mvp])

Attachments

(1 file)

[Steps to reproduce]:

0. Make sure you have at least one saved credit card record.
 
1. Go to www.walmart.ca and login 
2. Purchase any item and proceed to checkout
3. In Payment step (3 of 3), there is a form called "New Payment Method"
4. Click the Card number or Expiry field twice to trigger the autofill dropdown

[Expected result]:

The autofill dropdown should show up

[Actual result]:

The autofill dropdown didn't show up
Flags: needinfo?(schung)
We can detect the number/expiry date fields in www.walmart.ca, so it's not heuristic issue.
It's because MaybeStartControllingInput will check if the element is textControl[1] and type=number will be blocked[2]. If we want to make the number input works for formautofill, I can think of 2 possible solutions:

- Skip the textControl check in MaybeStartControllingInput if element is markAsFromfill since we already check the element type before calling markAsFromfill.
- Call IsSingleLineTextOrNumberControl instead of IsSingleLineTextControl if element is markAsFromfill that make sure we only support 1 more number type(And maybe we don't have to maintain the supported type list before calling markAsFromfill).

There might be a problem if the controller need to fallback to form-history, so we have to check if the type before switching startSearch. Hi MattN, do you think these solutions are safe without potential issue? 

[1] https://searchfox.org/mozilla-central/rev/cf149b7b63ff97023e28723167725e38cf5df757/toolkit/components/satchel/nsFormFillController.cpp#1063
[2] https://searchfox.org/mozilla-central/rev/cf149b7b63ff97023e28723167725e38cf5df757/dom/html/nsIFormControl.h#284
Flags: needinfo?(schung) → needinfo?(MattN+bmo)
Assignee: nobody → schung
I found that the number input could support keyboard up/down to increase/decrease the input value, not sure if it'll conflict to the our dropdown menu behavior.
(In reply to Steve Chung [:steveck] from comment #2)
> - Call IsSingleLineTextOrNumberControl instead of IsSingleLineTextControl if
> element is markAsFromfill that make sure we only support 1 more number
> type(And maybe we don't have to maintain the supported type list before
> calling markAsFromfill).

Since we'll support <textarea> in the future, `IsSingleLineTextOrNumberControl` sounds not to fit our use case.
We discussed that we can see what Chrome does and try to do no worse than them.
Flags: needinfo?(MattN+bmo)
After a short experiment without textControl checking, the number input could only work partly:
- Dropdown could be displayed, but there's no text in preview mode. This is because the number type input applies number control frame instead of text control frame, and there's no anonymous preview node for the number control frame. We will need to implement it again in the number control frame.
- Keyboard up/down could work to traverse the dropdown menu, but unfortunately it doesn't override the original number input behavior that using keyboard up/down to increase/decrease input value.
- The only good news is we can fill the profile correctly.

I'll create a meta bug that support input with number type and it will block the walmart.ca credit card filling. It's a non-trivial task and unlikely to be done in v2.
Depends on: 1429680
Per comment 6, this bug is caused because the input elements with type=number are not supported yet. We'll implement this feature in bug 1429680. Since it's a new feature and unlikely to be landed in Fx59, I'd like to remove it from the V2 scope.
Whiteboard: [form autofill:V2][Misc.]
Priority: -- → P3

Hi, This issue also occurs on step 2 when the user selects a Shipping address.

I can confirm this issue is still reproducible on the latest Nightly 79.0a1 (2020-06-03) on Windows 10. The autofill dropdown is not toggled.

Whiteboard: [ccautofill]
Priority: P3 → P2
Whiteboard: [ccautofill] → [cc-autofill-mvp]
Assignee: steveck324 → nobody
Depends on: 1647944

The current bug on walmart.ca appears to be unrelated to the analysis above. Since I can't reproduce that description, I trust that it will be addressed by bug 1429680 when we prioritize it. The current bug that reproduces on walmart.ca arises whenever an input for an expiration-related field includes a maxlength attribute. The current code attempts to treat the underlying number as a string, and throws an error. I will be attaching a proof-of-concept patch to this bug that addresses the issue. (The patch is probably just fine, but it needs a testcase added).

Assignee: nobody → adam
Status: NEW → ASSIGNED
Attachment #9160248 - Attachment description: Bug 1428269: Fix profile value truncation for numeric data → Bug 1428269: Fix profile value truncation for numeric data r?zbraniecki!
Pushed by adam@nostrum.com:
https://hg.mozilla.org/integration/autoland/rev/af264b95e019
Fix profile value truncation for numeric data r=zbraniecki
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80

Credit Card autofill works now on Walmart.ca but with multiple issues, submitted Bug 1655407 for that.
Verified-fixed on latest Nightly 80.0a1 (2020-07-26) (64-bit) on Windows 10, MacOS 10.13 and Ubuntu 16.04.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: