New issue
Advanced search Search tips

Issue 810778 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , iOS , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Amazon address form needs two taps to be filled

Project Member Reported by mard...@chromium.org, Feb 9 2018

Issue description

Chrome Version:M64
OS: iOS 11.2.5

What steps will reproduce the problem?
(1) Go to Amazon.com and sign-in
(2) Go to my account and go to the addresses section
(3) Click on "Enter new address" (or edit address)

What is the expected result?

Assuming you have addresses stored in Chrome, when tapping one of the addresses on the accessory row on top of the keyboard, they should fill the form

What happens instead?
First time the address is tapped, the form is momentarily filled then cleared. The second tap works.

 
Cc: olivierrobin@chromium.org
Cc: rogerm@chromium.org
Labels: -Pri-1 OS-Android OS-Linux OS-Mac OS-Windows Pri-2
Olivier and I did an investigation. This is a bug across all platforms. The issue is that when a non-US address is selected, the value of the country dropdown is autofilled first, and the form fields are recreated. This invalidates the form element instances that are cached waiting to be filled. Here are two possible ways to solve this: 

1) Detect when the form changes and re-fetch the form elements using their identifiers.

2) Introduce a delay between filling the form fields and re-fetch the form elements after each fill. This is somewhat flaky (less flaky with more delay) since the form doesn't change immediately after the country field is autofilled. You can see the result with 50, 100, and 200 ms delay between filling form fields. This approach can be optimized if we introduce the delay after autofilling <select> elements only, as they're more likely to refresh the form.

Both these approaches fail to work if the <form> element itself gets replaced (not that likely?)

amazon-no-delay.gif
1.8 MB View Download
amazon-100-delay.gif
1.6 MB View Download
amazon-200-delay.gif
2.6 MB View Download

Comment 3 by se...@chromium.org, Feb 10 2018

This is the kind of issue we refer to as "Dynamic Forms".

I've seen 4 types of this in the wild so far:
1- The values in the select get replaced
2- The select element itself gets replaced
3- The form itself gets replaced
4- A navigation to a different page happens

I'm currently working on a solution for problems 1-2-3. Hopefully I should have a general solution soon.

Basically, I'm trying to get notified of the change a re-trigger the fill on that element if the new value matches what we want to fill. I've got case 1 figured out at the moment.

Comment 4 by se...@chromium.org, Feb 10 2018

Cc: se...@chromium.org
#3:
This is a 5- here
5- All the other input elements of the forms are replaced (even the one not affected).
The new element are completely identical from the old ones, so in that case, rescanning is not necessary. The only issue is that the value is reset to blank.
Also, this happens between 150 and 250 ms after the selection of the value in the select (on an iPhone simulator).


Comment 6 by se...@chromium.org, Feb 12 2018

Ah I had not encountered those yet. For those we would need to refill the whole thing?
If this is happening on all platforms, wouldn't it make sense for it to be a P1 (like I had it originally?) 
Status: Fixed (was: Assigned)
This is fixed on all platforms now.

Sign in to add a comment