document.body.querySelector("input").addEventListener("blur",
function(e) {
e.preventDefault()
});
<input type="text">
Upon the blur event,if the string typed in the input would overflow, the shown area is scrolled back to the start. My snippet does not seem to prevent that behaviour. Is there any way to pull this trick off?
input.value = "aaaaaaaaaaabbb"
input.sketch = "|___________|"
inpur.ideal = "|___________|" //just an aligned visual aid
When input lose focus bbb is no longer shown,I would like to prevent the scroll back to start automagically.