Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: adding autofocus option to Netlify frontend bundle #849

Open
tinyapps opened this issue Mar 20, 2023 · 0 comments
Open

Comments

@tinyapps
Copy link

If time and resources permit, please consider adding the autofocus option to Netlify's frontend bundle. At the moment, this is what I'm doing instead (improvements by JavaScript wizards welcome!):

<script>
      // Wait 250ms before setting focus on the input element
      setTimeout(function() {
      // Get the input element
      const input = document.querySelector('input');
      // Focus on the input element
      input.focus();
      }, 250);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant