Open dinkelstefan opened 1 month ago
is very hard to support autocomplete.. ( I don't know much about it i was search the sample code and read html reference. username and password need element inside at
Thank you for your thoughts, for now saving the password is already great. I will try your idea when we experiment with password manager features in the future.
Maybe chrome will already save the username when I bind a type="email"
for the username WebGLInput field
now is pass the flag (bool) isPassword to javascript ( bool isPassword = input.contentType == ContentType.Password; )
maybe can conversion ContentType to string like.
string ContentTypeToInputType(ContentType type)
{
return type switch {
ContentType.Password => "password",
ContentType.EmailAddress => "email",
_ => "text"
};
}
and pass the string to javascript from WebGLInputPlugin.WebGLInputCreate(...)
memo: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input
and edit WebGLInput.jslib code
if(isPassword){
input.type = 'password';
}
↓ to
input.type = UTF8ToString(contentTypeString);
maybe work..haha
I don't know if it will work well or not but this change is not bad ^^
tried. when set type to email
Failed to execute 'setSelectionRange' on 'HTMLInputElement': The input element's type ('email') does not support selection.
The plugin is great for supporting browser password saving, but when saving passwords only the password is saved without the username. This is because it only keeps one HTML
<input>
active at the same time.Possible solution:
<input>
elements for username and password<input>
when selecting the linked Unity InputFieldsThank you for your work Kou-Yeung