2
Yes, the simplest, half "brute force" way is to rewrite the input value itself. This forces the cursor to go to the end.
Try moving the cursor with the arrows and then clicking on it.
var input = document.querySelector('input');
input.addEventListener('click', function() {
this.value = this.value;
});
<input type="text" value="algo para testar" />
This question may help you: https://stackoverflow.com/questions/511088/use-javascript-to-place-cursor-at-end-of-text-in-text-input-element
– Emerson Vieira
The above companion alternatives do not work in some browsers, if you have using pure js you can do a function that is executed in input onfocus
– Clailson Jorge