Open Bug 1871356 Opened 2 years ago Updated 2 years ago

Capture all formautofill fields on page navigation

Categories

(Toolkit :: Form Autofill, task, P3)

task

Tracking

()

People

(Reporter: janika, Unassigned)

Details

In Bug 1870718 we add form submission heuristics to capture the formautofill fields on page navigation and we use FormAutofillContent.activeFieldDetail as the anchor to retrieve the formautofill fields.

@dimi summarized the problem of using the active field as anchor very well in D196797:

We probably should not rely on active field because the form is being submitted might not be the active one. For example, there are two forms in a page, users fill something in form A and then fill something in form B but in the end the user decides to submit form A, which is not the "active" one. Another example is https://luke-chang.github.io/autofill-demo/autocomplete-all.html ,

and already proposed the following solution:

If we fill all the information in the address form and the credit card form, after submitting, we should capture both of the address and credit card. I guess what we need to do is iterating
https://searchfox.org/mozilla-central/rev/c3263d48f391c2c6c984b874986341baf667bf12/toolkit/components/formautofill/shared/FormStateManager.sys.mjs#17
and submitting all of forms we have identified for this document, which is also similar to what we have done for the password manager
https://searchfox.org/mozilla-central/rev/c3263d48f391c2c6c984b874986341baf667bf12/toolkit/components/passwordmgr/LoginManagerChild.sys.mjs#2307-2314

Severity: -- → N/A
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.