New issue
Advanced search Search tips

Issue 791569 link

Starred by 3 users

Issue metadata

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



Sign in to add a comment

[Autofill] Phone number field has wrong autocomplete type

Project Member Reported by ma...@chromium.org, Dec 4 2017

Issue description

On Sephora.com/.ca, the phone number field has autocomplete=tel, which means the full number +15145551212.

However, what the developer meant was autocomplete="tel-national" i.e. 5145551212. Instead, Autofill puts +15145551212 and JavaScript truncates it to 151 455 5121.

Their maxLength attribute doesn't help (set to 15).

The server prediction is correct in this case (PHONE_HOME_CITY_AND_NUMBER).

Should we trust the server predictions more than autocomplete attributes in the case of phone number fields?


 

Comment 1 by se...@chromium.org, Dec 4 2017

Yes, this was mentioned in the phone number bugs doc :) It's the last in the list though as it is the lest common and depends on fixing the other bugs first.
Status: Fixed (was: Assigned)
just realized it is already fixed with: https://chromium-review.googlesource.com/c/chromium/src/+/755853
Project Member

Comment 3 by bugdroid1@chromium.org, Dec 6 2017

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

commit 449cae27aa8a3053f77fb8e9d440c62be77e88a6
Author: Hui(Andy) Wu <wuandy@chromium.org>
Date: Wed Dec 06 15:21:56 2017

[autofill]Always override autocomplete=tel/tel-* with server prediction for phones.

Many web sites set autocomplete to wrong tel types. For example, they set it to
tel but then expects a national number(Sephora.com). This change overrides all fields
with autocomplete attribute set to tel/tel-* with server predictions, as long as
server thinks it's a phone number field as well.

Bug:  791569 
Change-Id: If2c8bea2e0f7d1fed71f019d4756670e62e8ce1c
Reviewed-on: https://chromium-review.googlesource.com/809092
Commit-Queue: Hui Wu <wuandy@chromium.org>
Reviewed-by: Roger McFarlane <rogerm@chromium.org>
Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522093}
[modify] https://crrev.com/449cae27aa8a3053f77fb8e9d440c62be77e88a6/components/autofill/core/browser/autofill_field.cc
[modify] https://crrev.com/449cae27aa8a3053f77fb8e9d440c62be77e88a6/components/autofill/core/browser/autofill_type.cc
[modify] https://crrev.com/449cae27aa8a3053f77fb8e9d440c62be77e88a6/components/autofill/core/browser/autofill_type.h
[modify] https://crrev.com/449cae27aa8a3053f77fb8e9d440c62be77e88a6/components/autofill/core/browser/field_filler_unittest.cc

Comment 4 by jgru...@gmail.com, May 21 2018

I'm trying to use autocomplete='tel' because yes, I really do want the full telephone with country code, but I'm getting a warning in Chrome:

[DOM] Input elements should have autocomplete attributes (suggested: autocomplete='tel-national', confirm at https://goo.gl/6KgkJg)

How does the server prediction work? How can I force it to use autocomplete='tel'?

Comment 5 by ma...@chromium.org, May 22 2018

Hi jgrucza, 

Sorry to hear about this issue. Server predictions are based on the name of the field. Changing the name of the field to something else (like "fulltel") may reset the server prediction for your site. 

Sign in to add a comment