New issue
Advanced search Search tips

Issue 725161 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Feature



Sign in to add a comment

Format as you type for phone number in desktop web payments UI

Project Member Reported by rouslan@chromium.org, May 22 2017

Issue description

Use libaddressinput to format the phone number when the user is typing it.
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/92e7407c76710e17382408458c711d10f1b6bef8

commit 92e7407c76710e17382408458c711d10f1b6bef8
Author: Rouslan Solomakhin <rouslan@chromium.org>
Date: Tue May 23 16:59:20 2017

Format-as-you-type for the phone number in web payments UI on desktop.

Before this patch, typing "3103106000" into a phone number field in web
payments UI on desktop would leave the field as-is, which is difficult
to read.

This patch extends ValidationDelegate to also handle text field
formatting. Formatting happens only when the user is typing at the end
of the field or when user has left the field (blur). Typing in the
middle of the field does not cause reformat because Views does not have
functionality to position the cursor, which is required to make
auto-formatting feel natural.

After this patch, typing "3103106000" into a phone number field in web
payments UI on desktop will format-as-you-type this number into "+1
310-310-6000".

Bug:  725161 
Change-Id: Id39de49e2a79a681ff2615541489be057b37d2de
Reviewed-on: https://chromium-review.googlesource.com/511422
Reviewed-by: Anthony Vallee-Dubois <anthonyvd@chromium.org>
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#473945}
[modify] https://crrev.com/92e7407c76710e17382408458c711d10f1b6bef8/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/92e7407c76710e17382408458c711d10f1b6bef8/chrome/browser/ui/views/payments/contact_info_editor_view_controller.cc
[modify] https://crrev.com/92e7407c76710e17382408458c711d10f1b6bef8/chrome/browser/ui/views/payments/contact_info_editor_view_controller.h
[modify] https://crrev.com/92e7407c76710e17382408458c711d10f1b6bef8/chrome/browser/ui/views/payments/contact_info_editor_view_controller_browsertest.cc
[modify] https://crrev.com/92e7407c76710e17382408458c711d10f1b6bef8/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.cc
[modify] https://crrev.com/92e7407c76710e17382408458c711d10f1b6bef8/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.h
[modify] https://crrev.com/92e7407c76710e17382408458c711d10f1b6bef8/chrome/browser/ui/views/payments/shipping_address_editor_view_controller_browsertest.cc
[modify] https://crrev.com/92e7407c76710e17382408458c711d10f1b6bef8/chrome/browser/ui/views/payments/validating_textfield.cc
[add] https://crrev.com/92e7407c76710e17382408458c711d10f1b6bef8/chrome/browser/ui/views/payments/validation_delegate.cc
[modify] https://crrev.com/92e7407c76710e17382408458c711d10f1b6bef8/chrome/browser/ui/views/payments/validation_delegate.h

 Issue 722460  has been merged into this issue.
Status: Fixed (was: Started)
Components: -UI>Browser>Autofill>Payments UI>Browser>Payments

Sign in to add a comment