Autofocus on searchbox not working
See original GitHub issueBug 🐞 When I add the autofocus attribute, it doesn’t work. No autofocus happens. In codepen I have this code (as described in the documentation):
<div class="searchbox">
<ais-search-box autofocus />
</div>
See https://codesandbox.io/s/happy-moore-yo82c?file=/src/App.vue
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
[Run] Search box does not auto focus · Issue #8876 - GitHub
I found such case which should be reproducible. I believe that the problem occurs when taskbar doesn't "return" back focus. Consider this ...
Read more >Why is jQuery-select2 autofocus not working and how do I fix it?
I'm using select2 in all my projects and it works fine. But in my new project, my select2 input doesn't focus as it...
Read more >autofocus for search bar - WordPress.org
Hello, I have a problem with the autofocus of the search bar. Unfortunately, since activating the plugin, you still have to click in...
Read more >How to auto focus on Searchbox on page load?
I'm using CoveoSearchbox component for input, so no possible way to add autofocus attribute to input element.
Read more >Why would the search input field not get focus when the page ...
Keyboard/screen-reader users will need to step out of the search field when it was focused automatically to make use of other ways to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Now it works! Thanks a million. Changed the MyFocuser.js into a component by the way, but that’s a formality. Maybe for others who read this, here is my end solution:
Component: FocusSearchBox.vue
and in my search component:
I’m not referring to a slot but to a class @eugenevk