fix: focus search inputs only on non-touch devices#426
fix: focus search inputs only on non-touch devices#426
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
| :placeholder="$t('search.placeholder')" | ||
| v-bind="noCorrect" | ||
| :autofocus="!isMobile" | ||
| :autofocus="autofocus" |
There was a problem hiding this comment.
Do we still need the autofocus if we are manually focusing on mount?
There was a problem hiding this comment.
for client side navigation - without it it doesn't focus when navigating from index to search page
but I'm very up for other ideas!
There was a problem hiding this comment.
A dodgy mechanism I looked at implementing was watching the route. Then if the new route.name was search but old one was not, it would focus the searchbox. Might be able to do the same thing here just include the touch part? Although if you are starting search on home screen on mobile you likely want to be auto focused to search to complete it.
I don't know vue/vue router enough to know if on direct nav to search if oldRoute has a value or not.
No description provided.