Closed Bug 1604807 Opened 4 years ago Closed 4 years ago

Clear form dropdown menu appears right after telephone or credit number are filled

Categories

(Toolkit :: Form Autofill, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla80
Tracking Status
firefox-esr68 --- wontfix
firefox-esr78 --- wontfix
firefox71 --- wontfix
firefox72 --- wontfix
firefox73 --- wontfix
firefox78 --- wontfix
firefox79 --- wontfix
firefox80 --- verified

People

(Reporter: bmaris, Assigned: abr)

References

Details

(Keywords: regression, Whiteboard: [cc-autofill-mvp])

Attachments

(2 files)

Affected versions

  • Firefox 72.0b8
  • Firefox 71.0 RC
  • Latest Nightly 73.0a1

Affected platforms

  • macOS 10.13
  • Windows 10 64bit
  • Ubuntu 18.04 64bit

Steps to reproduce
Prereq: Have an address already saved with phone number.

  1. Visit https://luke-chang.github.io/autofill-demo/basic.html
  2. Make one click to telephone Field
  3. Select a profile

Expected result

  • Fields are autofilled and dropdown menu is not shown again.

Actual result

  • Fields are autofilled but Clear Form option is visible after selecting the profile.
    This should only happen if one clicks the field again after the autofill happens, like on other fields (name, street etc)

Regression range

  • Not sure if this is a regression or not, 71 RC is also affected by this. Will investigate ASAP.

Additional notes

  • Credit number field is also affected by this.
Severity: normal → minor

Bugbug thinks this bug is a regression, but please revert this change in case of error.

Keywords: regression

P3 unless we find out this is a recent regression.

Priority: -- → P3

Not a recent regression but a regression nonetheless
Pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=8991d660f20e3eea652e060c30e17670b45a9257&tochange=fbd97100c83cc07705244725a3245e6d14bbe9cf

Possible culprit Bug 1505141 - Test that address fields hidden from edit forms aren't blanked unnecessarily. r=jaws

Has Regression Range: --- → yes
Has STR: --- → yes
Flags: needinfo?(MattN+bmo)

Hi,
I was unable to reproduce this issue on my end, I tried on Windows 10, MacOS 10.14.5 and Ubuntu 18.04.3 LTS with Firefox Nightly version 73.0a1 (2019-12-12) (64-bit).

After filling all the fields in form page, no information could be submitted, so the fields cannot be autofilled neither.

Please, provide any further information if necessary.

Thanks,
regards!

Jerónimo.

Marking this as fix-optional for 73 to remove it from weekly regression triage. We can still take a patch for 73 or 74.

Do you agree this isn't reproducible anymore?

Flags: needinfo?(MattN+bmo) → needinfo?(bogdan.maris)

I can still reproduce this on macOS 10.13.6 and Windows 10 64bit using latest Nightly 76.0a1 (buildID: 20200309215254)

Flags: needinfo?(bogdan.maris) → needinfo?(MattN+bmo)

I also see this behavior with Card Number and Expiration Date fields for Credit Cards on Ebay for example.

Whiteboard: [ccautofill]
Priority: P3 → P2
Whiteboard: [ccautofill] → [cc-autofill-mvp]
Assignee: nobody → adam
Status: NEW → ASSIGNED

The fundamental problem here was that the FormAutofillHandler would, after the user selects an item in the popup, set the value of all of the elements in the form, in order, to the corresponding values from the selected profile. This would trigger a input event for each, which ends up being sent to the nsAutoCompleteController. If this happens quickly enough, there are no bad effects. However, there's a race that can be lost which causes this input event to trigger the popup to open (which is why the flaw tended not to show up on the field early in the form, and tended to do so on later fields).

nsFormFillController already has a method (nsFormFillController::SetTextValue()) that includes a flag (mSuppressOnInput) designed to prevent this from happening in the generic form history case. The attached patch takes advantage of this existing mechanism by using nsFormFillController::SetTextValue() rather than setting the value of the text input element directly.

I'm clearing the ni? flag for Matt because I both reliably reproduce this issue under Windows, and can reliably demonstrate that the attached patch resolves it.

This patch contains no test case. I did invest significant time attempting to write tests to verify the fix mechanically, but the race being fixed behaves differently when running under mochitests, and I could not get the failure to reproduce in that environment.

Flags: needinfo?(MattN+bmo)
Pushed by adam@nostrum.com:
https://hg.mozilla.org/integration/autoland/rev/4a732e51e604
Set text field values through formFillController to avoid races r=zbraniecki
Pushed by adam@nostrum.com:
https://hg.mozilla.org/integration/autoland/rev/2fcd5b42215a
Set text field values through formFillController to avoid races r=zbraniecki

Mocked out the field-setting interface in tests, and checked that the related xpcshell and mochitests ran clean locally. New patch should address this issue.

Flags: needinfo?(adam)
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80

Reproduced the initial issue using an old Nightly build on Windows 10.
Verified - Fixed in latest Nightly 80.0a1 (build id: 20200710094819) using Windows 10 and Ubuntu 18.04. Fields are autofilled and the dropdown menu is not shown again.

Status: RESOLVED → VERIFIED
Regressions: 1654341
Regressions: 1656922
See Also: → 1657108
You need to log in before you can comment on or make changes to this bug.