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/511422Reviewed-by:Anthony Vallee-Dubois <anthonyvd@chromium.org> Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org> Cr-Commit-Position: refs/heads/master@{#473945}
Showing
Please register or sign in to comment