In the Payment Request unmask prompt, focus should go to the next field when one is complete |
||
Issue descriptionMore specifically, the focus should go to the year field once the month field has two characters filled and the focus should go to the cvc field when the year field has two characters.
,
Dec 6 2016
Focus should move only if input is valid.
,
Dec 6 2016
Ok so something like: If month is filled but year is empty, move to year. If both month and year are filled but wrong, stay at current field. If both month and year are filled and valid, move to CVC. ?
,
Dec 6 2016
Pretty much. Here's how I would phrase it: * After the value in month field changed, if it's a number from 1 to 12, move to year field. Otherwise show month error. * After the value in year field changed, if it's a number from 00 to 99 and at least as large as current year, move focus to cvc. Otherwise show year error. You may want to check that the date is in the future as well. Triggering this logic is on field change event is important for usability. There's no need to define behavior for staying at the current field. That's what happens by default. I don't see the point of checking whether the year field is empty before moving focus there. Do you?
,
Dec 6 2016
Not sure about point 1. For example, I could want to input 11 in the month field, and I would not want the focus to move to year after typing 1. So I would only change to year if there a two digits? I would have thought to not move the focus from year if the expiration date is not valid. For example, if I enter 06/16. even though the year could be valid, I would not switch to cvc? You are right, I would not implement behavior for staying at the current field :P My point for checking the year field is related to my second point above. If the exp is invalid and both fields have "values" I would not move focus. However. If only month has been filled, then it makes sense to move to year. WDYT?
,
Dec 6 2016
> For example, I could want to input 11 in the month field, and I would not want the focus to move to year after typing 1. So I would only change to year if there a two digits? Good point, move focus only if two digits are typed in, so 01 instead of 1. > I would have thought to not move the focus from year if the expiration date is not valid. For example, if I enter 06/16. even though the year could be valid, I would not switch to cvc? Yep. Show an error instead at this point.
,
Dec 7 2016
Hi Rouslan, here is the new demo. I also added error messages for the month and year fields. WDYT?
,
Dec 7 2016
After you've cleared the month field, the error should go away, right? Otherwise looks good.
,
Dec 8 2016
New video
,
Dec 8 2016
lgtm
,
Dec 9 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2f32a659f1da7d65a343bff11bb8544969ecf276 commit 2f32a659f1da7d65a343bff11bb8544969ecf276 Author: sebsg <sebsg@chromium.org> Date: Fri Dec 09 17:13:23 2016 [Payments] Move focus to next field in expired cvc unmask prompt. Moves the focus to the expiration year field when the expiration month field gets filled with a second character and move the focus to the cvc input field when the expiration year field gets filled with a second character. Also adds more detailed error messages for invalid expiration month and year. BUG= 671762 Review-Url: https://codereview.chromium.org/2557873002 Cr-Commit-Position: refs/heads/master@{#437571} [modify] https://crrev.com/2f32a659f1da7d65a343bff11bb8544969ecf276/chrome/android/java/src/org/chromium/chrome/browser/autofill/CardUnmaskPrompt.java [modify] https://crrev.com/2f32a659f1da7d65a343bff11bb8544969ecf276/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestExpiredLocalCardTest.java [modify] https://crrev.com/2f32a659f1da7d65a343bff11bb8544969ecf276/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFreeShippingTest.java [modify] https://crrev.com/2f32a659f1da7d65a343bff11bb8544969ecf276/components/autofill_strings.grdp
,
Dec 9 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by se...@chromium.org
, Dec 6 20161.6 MB
1.6 MB View Download