Closed Bug 1428269 Opened 5 years ago Closed 2 years ago
.ca, credit card autofill doesn't work
47 bytes, text/x-phabricator-request
|Details | Review|
[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
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 and type=number will be blocked. 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?  https://searchfox.org/mozilla-central/rev/cf149b7b63ff97023e28723167725e38cf5df757/toolkit/components/satchel/nsFormFillController.cpp#1063  https://searchfox.org/mozilla-central/rev/cf149b7b63ff97023e28723167725e38cf5df757/dom/html/nsIFormControl.h#284
Flags: needinfo?(schung) → needinfo?(MattN+bmo)
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.
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.
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 → P2
Whiteboard: [ccautofill] → [cc-autofill-mvp]
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 email@example.com: https://hg.mozilla.org/integration/autoland/rev/af264b95e019 Fix profile value truncation for numeric data r=zbraniecki
You need to log in before you can comment on or make changes to this bug.