Allow form autofill to display all possible address/credit card options on a prefilled field
Categories
(Toolkit :: Form Autofill, enhancement, P3)
Tracking
()
People
(Reporter: tgiles, Unassigned)
References
Details
As part of Bug 1687684, we decided that an input field that was prefilled by a site, i.e. where a field's value
is equal to its defaultValue
, will be treated as an empty/not user interacted field thus allowing autofill to override its contents with a selected option from the credit card/address popup menu. By implementing the previously mentioned bug, this also results in not being able to open the popup menu on a site prefilled input. This is because of "startSearch" in FormAutofillContent using the value of a field to search for autocomplete search matches. The only time the popup menu would appear is if the prefilled value matches some attribute of a saved credit card/address. Given the case in Bug 1687684, only people with a saved cardholder name of "John Doe" would be able to see the popup on the cardholder name field.
If we want site prefilled fields to effectively be empty/not user interacted fields, then we will need to add some special handling that is run before the previously mentioned startSearch
is called from the field. This likely means modifying Satchel code to achieve this by determining if the value of a field is equal to its default value and then searching with an empty string instead.
Reporter | ||
Comment 1•4 years ago
|
||
Hey Dimi, can you trace the "startSearch" path and see where we're actually calling this from? thanks!
Comment 2•4 years ago
|
||
I think startSearch is called from
https://searchfox.org/mozilla-central/rev/49b6e60550243b4b4d71d6ab35a3ff2b9a9f7c69/toolkit/components/autocomplete/nsAutoCompleteController.cpp#973
As for the entry point where we trigger the autocomplete, maybe try looking for formFillController.showPopup();
in formautofill.
Reporter | ||
Updated•3 years ago
|
Description
•