I have a search input text which I'd like to apply a focus()
when loading the page, the problem is that the focus
function automatically does a scroll to this field. Any solution to disable this scroll?
<input id="search_terms" type="text" />
<script>
document.getelementbyId('search-terms').focus();
</script>
See Question&Answers more detail:os