p5.js-web-editor icon indicating copy to clipboard operation
p5.js-web-editor copied to clipboard

fix autocapitalize in mweb safari

Open PiyushChandra17 opened this issue 2 years ago • 5 comments

Fixes #2623

Changes:

Added autoCapitalize attribute and set it to none

fix-autocapitalize

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 develop branch.
  • [x] is descriptively named and links to an issue number, i.e. Fixes #123

PiyushChandra17 avatar Nov 22 '23 07:11 PiyushChandra17

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.

lindapaiste avatar Nov 22 '23 20:11 lindapaiste

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

PiyushChandra17 avatar Nov 27 '23 06:11 PiyushChandra17

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

lindapaiste avatar Nov 28 '23 16:11 lindapaiste

@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

PiyushChandra17 avatar Nov 30 '23 06:11 PiyushChandra17

is this issue closed?

soniyadotp avatar Dec 04 '23 06:12 soniyadotp