The script below transforms all uppercase characters into an input.
<input type='text' name='meuInput'>
<script>
$("input").bind('keyup', function (e) {
if (e.which >= 97 && e.which <= 122) {
var newKey = e.which - 32;
e.keyCode = newKey;
e.charCode = newKey;
}
$(this).val(($(this).val()).toUpperCase());
});
</script>
On the desktop it works normally, but on mobile it doubles the text. But on mobile when:
Type: E
Sai: EE
Type: E is
Sai: And he is
I type: And it's a
Exit E is aE is aE is a
Is there another way or how to fix this?