My plugin has an input field.
What I’m trying to do: when the plugin UI is displayed (via slash command), the input field will be automatically focused.
What I’ve tried…
- add “autofocus” attribute to the input tag (i.e.
<input type="search" autofocus>
) - set
autoFocus: true
, i.e.logseq.showMainUI({autoFocus: true)})
- get the input field and add
.focus()
…but none of this worked. Any idea how to achieve that autofocus behavior?