Skip to content

fix autocapitalize in mweb safari #2628

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

PiyushChandra17
Copy link
Contributor

Fixes #2623

Changes:

Added autoCapitalize attribute and set it to none

fix-autocapitalize

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123

@lindapaiste
Copy link
Collaborator

Awesome! I didn't know about this autocapitalize attribute. Now I am looking at the specs on MDN and I see this:

The autocapitalize attribute never causes autocapitalization to be enabled for an <input> element with a type attribute whose value is url, email, or 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.

@PiyushChandra17
Copy link
Contributor Author

@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
Copy link
Collaborator

@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.

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?

@PiyushChandra17
Copy link
Contributor Author

@lindapaiste Yes, we don't need autoCapitalize here:

<input
className="form__input"
aria-label={t('SignupForm.EmailARIA')}
type="email"
id="email"
autoComplete="email"
{...field.input}
/>

@soniyaprasad77
Copy link
Contributor

is this issue closed?

@raclim raclim added Bug Error or unexpected behaviors Area: Mobile For issues affecting mobile or responsive behavior labels Jan 26, 2024
@raclim raclim merged commit f8cd102 into processing:develop Jun 3, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Mobile For issues affecting mobile or responsive behavior Bug Error or unexpected behaviors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mWeb(safari): First letter gets automatically capitalized in username or email input
4 participants