You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @punkpeye, thanks for your question! It looks like there was some confusion about the focus() method from useInputControl(). The key thing to note is that input.focus() simulates the browser's focus and focusin events, but it does not actually move the focus to the input element itself.
If you want to programmatically move the focus to an input field, you'll need to use the native DOM method, like inputElement.focus(), e.g.
I've also created a PR to improve the documentation based on this, so feel free to take a look and let me know if it's still confusing or if you have more suggestions. I appreciate the feedback!
Let me know if that clears things up or if you have more questions!
Describe the bug and the expected behavior
I am trying to focus a textarea input using
focus()
, but it does not do anything.Conform version
v1.2.2
Steps to Reproduce the Bug or Issue
What browsers are you seeing the problem on?
No response
Screenshots or Videos
No response
Additional context
I am seeing the "this fires" event logged, but textarea is never focused.
The text was updated successfully, but these errors were encountered: