Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Can't use ref for focus input (SOLVED) - Nuxt
N
Nuxt
•
2y ago
•
10 replies
cak malik
Can't use ref for focus input (SOLVED)
why doesnt work with nuxt
this is my code
const searchInput
= ref
<HTMLInputElement
| null
>
(null
)
;
onMounted
(
(
)
=
>
{
searchInput
.value
?
.focus
(
)
;
}
)
;
and i got error
500
searchInput
.value
.focus is not a function
Nuxt
Join
Nuxt Community Chat Server
31,686
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Focus input
N
Nuxt / ❓・help
4y ago
Can't input url manually
N
Nuxt / ❓・help
5mo ago
Typing ref for $fetch
N
Nuxt / ❓・help
2y ago