Replies: 3 comments 1 reply
-
I think that's a perfectly reasonable option. I could easily implement:
As well as a manual action:
(There's already a hidden |
Beta Was this translation helpful? Give feedback.
-
That would be fantastic! |
Beta Was this translation helpful? Give feedback.
-
There is an HTML attribute autofocus that should do the trick? Why not add it at least to the PagefindUI as this seems to be something that is designed to be the focal point of a page that it is one (as opposed to a search field somewhere hidden in the navigation bar)? |
Beta Was this translation helpful? Give feedback.
-
I'm putting the Pagefind UI within a modal dialog that opens up when someone clicks a Search button in the navbar of my site. Right now, I have to do some hacky stuff to wait for the search input to be rendered and then add focus to it.
Would it make sense to have an option to automatically focus the search input? I'm not super familiar with Svelte, but it seems it would be easier to do it within the Pagefind UI. On the other hand, I don't want to pollute the API with too many options.
Beta Was this translation helpful? Give feedback.
All reactions