RESOLVED FIXED 55988
input type=email is too strict
https://bugs.webkit.org/show_bug.cgi?id=55988
Summary input type=email is too strict
Nathan Samson
Reported 2011-03-08 17:27:54 PST
Example document (extract) <form> <input type="email" name="email" /> <input type="submit" label="Submit" /> </form> When typing in the input field: "nathan@psi" and submitting the form a popup/tooltip appears with the text: "Enter an email" (manually translated from dutch, the correct english sentence will probably be different). The text message is compliant with the spec (a valid email should be entered), but this is exactly what I did, so it shouldn't complain. This happens in Chrome 10 (10.0.648.127, windows) and Chrome 11 (11.0.695.0, linux), but NOT in chrome 9 (9.0.597.107, linux). It works in firefox 4, and it should work as I see the spec. Also it says what you should do, but the check itself seems to be incorrect. (@psi is a valid domainname, its the name of my computer, the site where it is hosted is also @psi, so it should be able to contact it).
Attachments
Patch (3.40 KB, patch)
2011-05-11 04:10 PDT, Kent Tamura
no flags
Kent Tamura
Comment 1 2011-03-09 01:05:49 PST
Actually, the W3C HTML5 says: http://www.w3.org/TR/html5/states-of-the-type-attribute.html#valid-e-mail-address > A valid e-mail address is a string that matches the ABNF production 1*( atext / "." ) "@" ldh-str 1*( "." ldh-str ) and WHATWG HTML says: http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address > A valid e-mail address is a string that matches the ABNF production 1*( atext / "." ) "@" ldh-str *( "." ldh-str ) I think the WHATWG definition was changed recently. The current WebKit implementation is based on the W3C HTML5 specification, which rejects "nathan@psi". We should update the implementation for the WHATWG definition.
Kent Tamura
Comment 2 2011-05-11 04:10:29 PDT
WebKit Commit Bot
Comment 3 2011-05-11 18:18:24 PDT
Comment on attachment 93103 [details] Patch Clearing flags on attachment: 93103 Committed r86298: <http://trac.webkit.org/changeset/86298>
WebKit Commit Bot
Comment 4 2011-05-11 18:18:29 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.