New issue
Advanced search Search tips

Issue 638455 link

Starred by 9 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Sep 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Setting a partially completed value on input with type=email produces console warnings

Reported by jenanw...@gmail.com, Aug 17 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.57 Safari/537.36

Steps to reproduce the problem:
1. Create an `input` element with `type=email`
2. Set `element.value = "foo"`
3. See console warnings: `The specified value "foo" is not a valid email address.`

What is the expected behavior?
No warnings, since setting the value to a not-yet-valid email is expected behavior of controlled inputs.

What went wrong?
Chrome warned when it should not have.

Did this work before? Yes Unknown. I can reproduce with versions >= 51.

Chrome version: 53.0.2785.57  Channel: beta
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 22.0 r0

This is particularly a problem for "controlled" inputs, where the application controls the source of truth for a form and sets it each rendering tick (e.g. React).

There is a React bug at https://github.com/facebook/react/issues/7487 discussing this, and they seem to think it is an upstream.
 
Components: -Blink Blink>Forms
Labels: -Type-Bug M-54 OS-Linux OS-Windows Type-Bug-Regression
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on Windows 7, Mac 10.11.6, Ubuntu 14.04 using 53.0.2785.57, latest stable 52.0.2743.116, canary 54.0.2831.0 with below steps:

1.Opened URL: https://jsfiddle.net/mqpad969/
2.Typed anything in input box.
3.Navigated to dev tools->console.
4.Observed the warning 'The specified value "foo" is not a valid email address'.

This is regression issue broken in M-41.

Please find below bisect info:
Last good build:41.0.2226.0
First bad build:41.0.2230.0

CHANGELOG URL:
https://chromium.googlesource.com/chromium/src/+log/ccfd8f4be70bf6704be00aaa72b22d244880e618..cd56adef2de01cc25cfa5b795a6e265a88fd2935

Unable to find exact suspect from above CL.Marking it as untriaged.
Could anyone from dev team look into this issue and assign it to an appropriate dev person please.

Thanks,

Comment 3 by tkent@chromium.org, Aug 19 2016

Components: -Blink>Forms Blink>Forms>Email
Labels: -M-54 Hotlist-GoodFirstBug OS-Android OS-Chrome
Status: Available (was: Untriaged)
Hmm, I have no idea how to distinguish such partial value for "controlled" inputs and invalid email addresses which web developers mistakenly specified.  So, probably we should simply remove the warning.

A fix would be just to remove EmailInputType::warnIfValueIsInvalid(), and update layout tests.

Comment 4 by scf@google.com, Sep 8 2016

can i grab this task?

Comment 5 by scf@google.com, Sep 8 2016

I have a clarifying question on this task though.

There are other input types that have the same method ::warnIfValueIsInvalid. removing the warning from the email will cause it to be inconsistent with the other inputs. For example: DateInputType, MonthInputType, RangeInputType, etc.

Comment 6 by tkent@chromium.org, Sep 9 2016

#5, we don't need to remove warnings for date, month, range, etc.  Web developers can't set invalid values for these types at all.

We should remove the warning only for email type.

I would like to work on this bug. I've already uploaded a patch for this -
https://codereview.chromium.org/2339113002/

Comment 8 by tkent@chromium.org, Sep 20 2016

Status: Started (was: Available)
It seems three people are working on this.
 - scf@
 - preeti.nayak@  https://codereview.chromium.org/2339113002/
 - sujae33.jo@ https://codereview.chromium.org/2339493002/
Project Member

Comment 9 by bugdroid1@chromium.org, Sep 21 2016

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

commit 1676e3b6c99cde2e3581315e50b37e29876900d0
Author: sujae33.jo <sujae33.jo@gmail.com>
Date: Wed Sep 21 01:43:08 2016

Remove noisy value validation warnings for email input type.

We cannot distinguish invalid email addresses
which web developers mistakenly specified.

BUG= 638455 

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

[modify] https://crrev.com/1676e3b6c99cde2e3581315e50b37e29876900d0/AUTHORS
[modify] https://crrev.com/1676e3b6c99cde2e3581315e50b37e29876900d0/third_party/WebKit/LayoutTests/fast/forms/ValidityState-patternMismatch-expected.txt
[delete] https://crrev.com/4a49910be30c80f58896c9e44b6d30dc67d8b799/third_party/WebKit/LayoutTests/fast/forms/email-format-warning-expected.txt
[delete] https://crrev.com/4a49910be30c80f58896c9e44b6d30dc67d8b799/third_party/WebKit/LayoutTests/fast/forms/email-format-warning.html
[modify] https://crrev.com/1676e3b6c99cde2e3581315e50b37e29876900d0/third_party/WebKit/LayoutTests/fast/forms/email-idn-conversion-expected.txt
[modify] https://crrev.com/1676e3b6c99cde2e3581315e50b37e29876900d0/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/forms/constraints/form-validation-checkValidity-expected.txt
[modify] https://crrev.com/1676e3b6c99cde2e3581315e50b37e29876900d0/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/forms/constraints/form-validation-reportValidity-expected.txt
[modify] https://crrev.com/1676e3b6c99cde2e3581315e50b37e29876900d0/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/forms/constraints/form-validation-validate-expected.txt
[delete] https://crrev.com/4a49910be30c80f58896c9e44b6d30dc67d8b799/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/forms/constraints/form-validation-validity-tooShort-expected.txt
[modify] https://crrev.com/1676e3b6c99cde2e3581315e50b37e29876900d0/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/forms/constraints/form-validation-validity-valid-expected.txt
[modify] https://crrev.com/1676e3b6c99cde2e3581315e50b37e29876900d0/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/forms/the-input-element/type-change-state-expected.txt
[modify] https://crrev.com/1676e3b6c99cde2e3581315e50b37e29876900d0/third_party/WebKit/LayoutTests/platform/win7/imported/wpt/html/semantics/forms/constraints/form-validation-reportValidity-expected.txt
[modify] https://crrev.com/1676e3b6c99cde2e3581315e50b37e29876900d0/third_party/WebKit/Source/core/html/forms/EmailInputType.cpp
[modify] https://crrev.com/1676e3b6c99cde2e3581315e50b37e29876900d0/third_party/WebKit/Source/core/html/forms/EmailInputType.h

Comment 10 by tkent@chromium.org, Sep 21 2016

Labels: M-55
Status: Fixed (was: Started)

Sign in to add a comment