Amazon address form needs two taps to be filled |
||||
Issue descriptionChrome 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.
,
Feb 9 2018
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?)
,
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.
,
Feb 10 2018
,
Feb 12 2018
#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).
,
Feb 12 2018
Ah I had not encountered those yet. For those we would need to refill the whole thing?
,
Feb 13 2018
If this is happening on all platforms, wouldn't it make sense for it to be a P1 (like I had it originally?)
,
Apr 16 2018
This is fixed on all platforms now. |
||||
►
Sign in to add a comment |
||||
Comment 1 by mahmadi@chromium.org
, Feb 9 2018