fix autocapitalize in mweb safari
Fixes #2623
Changes:
Added autoCapitalize attribute and set it to none
I have verified that this pull request:
- [x] has no linting errors (
npm run lint) - [x] has no test errors (
npm run test) - [x] is from a uniquely-named feature branch and is up to date with the
developbranch. - [x] is descriptively named and links to an issue number, i.e.
Fixes #123
Awesome! I didn't know about this autocapitalize attribute. Now I am looking at the specs on MDN and I see this:
The
autocapitalizeattribute never causes autocapitalization to be enabled for an<input>element with a type attribute whose value isurl,password.
And I see that we have these two inputs set to type="text" instead of the more specific type="email". So I think we should change the type. We can keep the autocapitalize to be safe, but it seems like it's not strictly needed if we have the correct <input> type.
@lindapaiste Even if we set to type="email" doesn't seem to work, if we remove autoCapitalize attribute. Can you please verify. I think same is happening on sign up username form field aswell where we have specified type="text". I think autoCapitalize is mandatory here.
@lindapaiste Even if we set to
type="email"doesn't seem to work, if we removeautoCapitalizeattribute. Can you please verify. I think same is happening on sign upusernameform field aswell where we have specifiedtype="text". I thinkautoCapitalizeis mandatory here.
Sorry to drag you in circles but now I realize that you had it right the first time. I didn't see that the login input accepts email OR username, so we should stay with type="text" and autoCapitalize="none" because the input is not always an email address.
On the sign up form there is an email field which is always an email, lines 82-89. That one has type="email" so I'm not sure if we need the autoCapitalize there or not. I think not?
@lindapaiste Yes, we don't need autoCapitalize here:
https://github.com/processing/p5.js-web-editor/blob/f725abd1505a1fecd8b58ed2f4a57367a6051d27/client/modules/User/components/SignupForm.jsx#L81-L88
is this issue closed?