New issue
Advanced search Search tips

Issue 710374 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

[Password Manager] [META] Username field is not filled when the user interacts with password field.

Project Member Reported by kolos@chromium.org, Apr 11 2017

Issue description

Since M58, filling password by click should be available everywhere. But filling password through the suggestion in the password field doesn't fill username, which then still needs to be typed manually.

This is an umbrella bug for concrete instances of this problem.
 

Comment 1 by kolos@chromium.org, Apr 11 2017

Blocking: 606736

Comment 2 by kolos@chromium.org, Apr 11 2017

Blocking: 586465

Comment 3 by kolos@chromium.org, Apr 11 2017

Blocking: 710003

Comment 4 by vabr@chromium.org, Apr 13 2017

Labels: Hotlist-Polish

Comment 5 by vabr@chromium.org, Apr 16 2017

Description: Show this description

Comment 6 by vabr@chromium.org, Apr 16 2017

Blocking: 708605

Comment 7 by vabr@chromium.org, Apr 16 2017

Blocking: 708602

Comment 8 by kolos@chromium.org, May 8 2017

casino.bet365.com Only username or password could be autofilled on login page.
Project Member

Comment 9 by bugdroid1@chromium.org, May 29 2017

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

commit 97b7f62478df1974a2742137afe572f3621464af
Author: pkalinnikov <pkalinnikov@chromium.org>
Date: Mon May 29 10:13:04 2017

Autofill username when the user interacts with the password field.

Previously, when the user clicked on a password field, only this field
was autocompleted with their password. This CL ensures that the username
field is autocompleted as well.

If the user interacts with a password field then the username is filled
only if it was empty or *autofilled*, i.e. the user-supplied data is
never overridden.

Note that this works only if the username field was found.

BUG= 710374 , 708605 , 708602 

Review-Url: https://codereview.chromium.org/2902113004
Cr-Commit-Position: refs/heads/master@{#475329}

[modify] https://crrev.com/97b7f62478df1974a2742137afe572f3621464af/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
[modify] https://crrev.com/97b7f62478df1974a2742137afe572f3621464af/components/autofill/content/renderer/password_autofill_agent.cc

Project Member

Comment 10 by bugdroid1@chromium.org, May 30 2017

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

commit 4afdcc3b649fd9e056ccfe078890c39419e62d08
Author: pkalinnikov <pkalinnikov@chromium.org>
Date: Tue May 30 09:51:14 2017

Add username field discovery heuristic.

There are some cases when autofill can't find a username field for
autocompletion. For example, if the field is created dynamically in JavaScript.
This CL introduces a heuristic which is used as a fallback in such cases to
find a username field.

When password form autocompletion is about to happen with unknown username
field, the heuristic searches for the closest visible autocompletable
non-password text element preceding the password element. If one found, it is
believed to be the username field.

BUG= 710374 ,606736, 586465 ,710003

Review-Url: https://codereview.chromium.org/2889393002
Cr-Commit-Position: refs/heads/master@{#475481}

[modify] https://crrev.com/4afdcc3b649fd9e056ccfe078890c39419e62d08/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
[modify] https://crrev.com/4afdcc3b649fd9e056ccfe078890c39419e62d08/components/autofill/content/renderer/password_autofill_agent.cc
[modify] https://crrev.com/4afdcc3b649fd9e056ccfe078890c39419e62d08/components/autofill/content/renderer/password_autofill_agent.h

Owner: pkalinnikov@chromium.org
Status: Started (was: Untriaged)
Labels: Merge-Request-60
I intent to merge crrev/2902113004 and crrev/2889393002 to M60. Adding the label to get an approval.
Blocking: -586465 -710003 -708602 -606736 -708605
Removing the blocking issues, because this metabug's aspect has been fixed in those. There are other aspects, however, which will be reported in separate metabugs (e.g., the form is not autofilled on navigation, the autofill suggestion list is not triggered when interacting with the username field, etc.).
Status: Available (was: Started)
Summary: [Password Manager] [META] Username field is not filled when the user interacts with password field. (was: [Password Manager] [META] Password could be filled by click, username couldn't. Fix it)
Please tag with applicable OSs.  Thanks.
Labels: OS-Linux OS-Mac OS-Windows
Project Member

Comment 17 by sheriffbot@chromium.org, May 31 2017

Labels: -Merge-Request-60 Hotlist-Merge-Approved Merge-Approved-60
Your change meets the bar and is auto-approved for M60. Please go ahead and merge the CL to branch 3112 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), josafat@(ChromeOS), bustamante@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 18 by bugdroid1@chromium.org, May 31 2017

Labels: -merge-approved-60 merge-merged-3112
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/27a63fbaf769d23df0973c9d01ee9763ce3ca862

commit 27a63fbaf769d23df0973c9d01ee9763ce3ca862
Author: Pavel Kalinnikov <pkalinnikov@chromium.org>
Date: Wed May 31 13:46:16 2017

Autofill username when the user interacts with the password field.

Previously, when the user clicked on a password field, only this field
was autocompleted with their password. This CL ensures that the username
field is autocompleted as well.

If the user interacts with a password field then the username is filled
only if it was empty or *autofilled*, i.e. the user-supplied data is
never overridden.

Note that this works only if the username field was found.

BUG= 710374 , 708605 , 708602 

Review-Url: https://codereview.chromium.org/2902113004
Cr-Original-Commit-Position: refs/heads/master@{#475329}
Review-Url: https://codereview.chromium.org/2910403003 .
Cr-Commit-Position: refs/branch-heads/3112@{#51}
Cr-Branched-From: b6460e24cf59f429d69de255538d0fc7a425ccf9-refs/heads/master@{#474897}

[modify] https://crrev.com/27a63fbaf769d23df0973c9d01ee9763ce3ca862/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
[modify] https://crrev.com/27a63fbaf769d23df0973c9d01ee9763ce3ca862/components/autofill/content/renderer/password_autofill_agent.cc

Project Member

Comment 19 by bugdroid1@chromium.org, May 31 2017

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

commit 525e06d30faf3fdbfb85e2b0e1e7c0c1bdc031e5
Author: Pavel Kalinnikov <pkalinnikov@chromium.org>
Date: Wed May 31 13:49:43 2017

Add username field discovery heuristic.

There are some cases when autofill can't find a username field for
autocompletion. For example, if the field is created dynamically in JavaScript.
This CL introduces a heuristic which is used as a fallback in such cases to
find a username field.

When password form autocompletion is about to happen with unknown username
field, the heuristic searches for the closest visible autocompletable
non-password text element preceding the password element. If one found, it is
believed to be the username field.

BUG= 710374 ,606736, 586465 ,710003

Review-Url: https://codereview.chromium.org/2889393002
Cr-Original-Commit-Position: refs/heads/master@{#475481}
Review-Url: https://codereview.chromium.org/2918543002 .
Cr-Commit-Position: refs/branch-heads/3112@{#52}
Cr-Branched-From: b6460e24cf59f429d69de255538d0fc7a425ccf9-refs/heads/master@{#474897}

[modify] https://crrev.com/525e06d30faf3fdbfb85e2b0e1e7c0c1bdc031e5/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
[modify] https://crrev.com/525e06d30faf3fdbfb85e2b0e1e7c0c1bdc031e5/components/autofill/content/renderer/password_autofill_agent.cc
[modify] https://crrev.com/525e06d30faf3fdbfb85e2b0e1e7c0c1bdc031e5/components/autofill/content/renderer/password_autofill_agent.h

Comment 20 by vabr@chromium.org, Jun 12 2017

Looking at citicards.com, where the current ways of finding the username don't work, I realised that the tab order could help us: the username is the field where you get from the password field after pressing Shift+Tab (i.e., you get from the username to password by pressing tab). While the form contains a lot of hidden garbage fields, those have tabindex="-1". If we could iterate over the input fields in tab order rather than in the order of appearance in DOM, that might be better for finding the username.

Comment 21 by vabr@chromium.org, Jun 12 2017

After some offline discussion with dvadym@ and kolos@, I no longer think tab order is helpful, because it won't work for sign-up forms (and we not always know for sure whether a form is a sign-up or sign-in). Adding it to the local heuristics would cost us some code complexity, and it is not clear that it would be worth it.
Let's see how much of this problem is fixed through server-based solutions, and revisit tab order if other paths fail.
Owner: ----

Comment 23 by kolos@chromium.org, Oct 23 2017

Cc: kolos@chromium.org
Labels: meta-bug

Comment 25 by kolos@chromium.org, Nov 27 2017

Status: Fixed (was: Available)
I believe Pavel implemented what was supposed in this bug (try to fill the text field right before the password field where a user triggers the dropdown list of saved passwords). 

citicard.com tricks the password manager with hidden fields. Let's redirect such issues to another meta bug - Password forms not filled (Issue 770175).

Sign in to add a comment