New issue
Advanced search Search tips

Issue 860542 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 30
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 1
Type: Bug



Sign in to add a comment

[Autofill] JS formatting contradicts the last user edit logic.

Project Member Reported by parastoog@chromium.org, Jul 5

Issue description

When we Autofill, to decide if we should fill a field or leave it as is, we check if the last edit was user's edit. If so, we would not autofill (clear, etc). But sometimes, the website writes on the top of the autofilled value (exp: formatting a phone number). So, if the user adds a value on the field, the JS would edit it, and it would be overwritten by autofill.

Exp: disney, shipping, phone field.

 
Another example is freepeople, shipping address, street address.
Description: Show this description
also zip for etsy.
Cc: parastoog@chromium.org
 Issue 866075  has been merged into this issue.
Status: Started (was: Available)
etsy and freepeople are of another nature. The problem is most probably rooted in the dynamic form. Added them to crbug/850231.
Labels: M-69
Project Member

Comment 7 by bugdroid1@chromium.org, Jul 30

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

commit e9e9833d8b0bedfd9d1a43084d2cd1aed13ef469
Author: Parastoo Geranmayeh <parastoog@google.com>
Date: Mon Jul 30 15:11:58 2018

[Autofill] Keeping the user edit.

Problem:
When we Autofill, to decide if we should fill a field or leave it as
is, we check if the last edit was user's edit. If so, we would not
autofill (clear, etc). But sometimes, the website writes on the top
of the autofilled value (exp: formatting a phone number). So, if the
user adds a value on the field, the JS would edit it, and it would be
overwritten by autofill.
Solution:
Instead of looking at the last edit, look if the user has
ever edited that field.

Bug:  860542 ,  867556 
Change-Id: I59ec9c1efab98a9a07f23a47a0354e04ba9b87aa
Reviewed-on: https://chromium-review.googlesource.com/1150683
Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Parastoo Geranmayeh <parastoog@google.com>
Cr-Commit-Position: refs/heads/master@{#579038}
[modify] https://crrev.com/e9e9833d8b0bedfd9d1a43084d2cd1aed13ef469/chrome/renderer/autofill/form_autofill_browsertest.cc
[modify] https://crrev.com/e9e9833d8b0bedfd9d1a43084d2cd1aed13ef469/components/autofill/content/renderer/form_autofill_util.cc
[modify] https://crrev.com/e9e9833d8b0bedfd9d1a43084d2cd1aed13ef469/third_party/blink/public/web/web_form_control_element.h
[modify] https://crrev.com/e9e9833d8b0bedfd9d1a43084d2cd1aed13ef469/third_party/blink/renderer/core/exported/web_form_control_element.cc
[modify] https://crrev.com/e9e9833d8b0bedfd9d1a43084d2cd1aed13ef469/third_party/blink/renderer/core/html/forms/text_control_element.cc
[modify] https://crrev.com/e9e9833d8b0bedfd9d1a43084d2cd1aed13ef469/third_party/blink/renderer/core/html/forms/text_control_element.h

Status: Fixed (was: Started)
Labels: Merge-Request-69
Labels: -Pri-3 Pri-1
Pls apply appropriate OSs label.
Labels: OS-Android OS-Chrome OS-Linux OS-Mac OS-Windows
Project Member

Comment 13 by sheriffbot@chromium.org, Jul 31

Labels: -Merge-Request-69 Hotlist-Merge-Approved Merge-Approved-69
Your change meets the bar and is auto-approved for M69. Please go ahead and merge the CL to branch 3497 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), kariahda@(iOS), cindyb@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Pls merge your change to M69 branch 3497 ASAP so we can pick it up for this week M69 Dev/Beta release. Thank you.
Project Member

Comment 15 by bugdroid1@chromium.org, Jul 31

Labels: -merge-approved-69 merge-merged-3497
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2171da0f30ec3b712f4d23363c5950d38a8a140b

commit 2171da0f30ec3b712f4d23363c5950d38a8a140b
Author: Parastoo Geranmayeh <parastoog@google.com>
Date: Tue Jul 31 19:42:18 2018

Merge-69 [Autofill] Keeping the user edit.

Problem:
When we Autofill, to decide if we should fill a field or leave it as
is, we check if the last edit was user's edit. If so, we would not
autofill (clear, etc). But sometimes, the website writes on the top
of the autofilled value (exp: formatting a phone number). So, if the
user adds a value on the field, the JS would edit it, and it would be
overwritten by autofill.
Solution:
Instead of looking at the last edit, look if the user has
ever edited that field.

Bug:  860542 ,  867556 
Change-Id: I59ec9c1efab98a9a07f23a47a0354e04ba9b87aa
Reviewed-on: https://chromium-review.googlesource.com/1150683
Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Parastoo Geranmayeh <parastoog@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#579038}(cherry picked from commit e9e9833d8b0bedfd9d1a43084d2cd1aed13ef469)
Reviewed-on: https://chromium-review.googlesource.com/1156766
Cr-Commit-Position: refs/branch-heads/3497@{#291}
Cr-Branched-From: 271eaf50594eb818c9295dc78d364aea18c82ea8-refs/heads/master@{#576753}
[modify] https://crrev.com/2171da0f30ec3b712f4d23363c5950d38a8a140b/chrome/renderer/autofill/form_autofill_browsertest.cc
[modify] https://crrev.com/2171da0f30ec3b712f4d23363c5950d38a8a140b/components/autofill/content/renderer/form_autofill_util.cc
[modify] https://crrev.com/2171da0f30ec3b712f4d23363c5950d38a8a140b/third_party/blink/public/web/web_form_control_element.h
[modify] https://crrev.com/2171da0f30ec3b712f4d23363c5950d38a8a140b/third_party/blink/renderer/core/exported/web_form_control_element.cc
[modify] https://crrev.com/2171da0f30ec3b712f4d23363c5950d38a8a140b/third_party/blink/renderer/core/html/forms/text_control_element.cc
[modify] https://crrev.com/2171da0f30ec3b712f4d23363c5950d38a8a140b/third_party/blink/renderer/core/html/forms/text_control_element.h

Cc: mahmadi@chromium.org
mahmadi@:
Maybe we should check this for iOS as well.

Sign in to add a comment