1

I'm using Bootstrap on a site. Bootstrap is loading via a cdn. I can't edit the code directly. How can I remove the form auto focus? When I visit the page it automatically jumps down to the bottom of the page where the form is.

4
  • Can you add a dummy input at the top of the page? Commented Jun 13, 2018 at 19:24
  • That did not work. Commented Jun 13, 2018 at 19:33
  • Better just to use JavaScript with something like: document.querySelector('classname-of-element').autofocus = false; Commented Jun 14, 2018 at 10:23
  • Bootstrap does not cause auto-focus by itself on a form so you have either set the autofocus attribute on the field, or some other JS is setting it. Commented Jun 15, 2018 at 13:12

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.