Im rewriting some JS in Elm.
When the user clicks on an element the JS replaces the element with an <input> with the same contents, and calls .focus()
In Elm I'm keeping the editing state in a boolean and view draws the component as <input> when were editing, and the display element when we're not.
But I don't know how to focus the <input> element when I render it. Autofocus doesn't do it.
Am i going about this the right way?
Is there a way to call .focus() from existing elm libraries or do I need to write custom JS interop?
Thanks
Mark