mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 08:23:48 +03:00
do not use input type=email for email addresses
despite the name, it doesn't actually check for valid email addresses: it doesn't allow non-ascii localparts, accepts various invalid localparts, and rejects various valid localparts. no point in using it.
This commit is contained in:
parent
606b915447
commit
ad8c5616b1
2 changed files with 9 additions and 2 deletions
|
@ -1779,7 +1779,11 @@ const accounts = async () => {
|
|||
e.stopPropagation();
|
||||
await check(fieldset, client.AccountAdd(account.value, email.value));
|
||||
window.location.hash = '#accounts/' + account.value;
|
||||
}, fieldset = dom.fieldset(dom.label(style({ display: 'inline-block' }), dom.span('Email address', attr.title('The initial email address for the new account. More addresses can be added after the account has been created.')), dom.br(), email = dom.input(attr.type('email'), attr.required(''), function keyup() {
|
||||
}, fieldset = dom.fieldset(dom.label(style({ display: 'inline-block' }), dom.span('Email address', attr.title('The initial email address for the new account. More addresses can be added after the account has been created.')), dom.br(),
|
||||
// Cannot use type=email, it doesn't actually check for valid email addresses,
|
||||
// rejecting any non-ascii localpart, accepting some invalid addresses, and
|
||||
// rejecting other valid addresses. https://github.com/whatwg/html/issues/4562
|
||||
email = dom.input(attr.required(''), function keyup() {
|
||||
if (!accountModified) {
|
||||
account.value = email.value.split('@')[0];
|
||||
}
|
||||
|
|
|
@ -540,7 +540,10 @@ const accounts = async () => {
|
|||
style({display: 'inline-block'}),
|
||||
dom.span('Email address', attr.title('The initial email address for the new account. More addresses can be added after the account has been created.')),
|
||||
dom.br(),
|
||||
email=dom.input(attr.type('email'), attr.required(''), function keyup() {
|
||||
// Cannot use type=email, it doesn't actually check for valid email addresses,
|
||||
// rejecting any non-ascii localpart, accepting some invalid addresses, and
|
||||
// rejecting other valid addresses. https://github.com/whatwg/html/issues/4562
|
||||
email=dom.input(attr.required(''), function keyup() {
|
||||
if (!accountModified) {
|
||||
account.value = email.value.split('@')[0]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue