That is a strange behavior. Here is a simplest example, where the cursor stays where it was: https://ellie-app.com/3XzqjnmpZg6a1/0
Maybe your scenario is different? On Thursday, June 8, 2017 at 2:25:22 AM UTC+2, Carlos De la Guardia wrote: > > Howdy all, > > I'm creating an Elm version of this app: https://carlosd.org/cheatsheeter/ > It's got a bunch of fields users can edit, and which are saved in local > storage. I'm running into a problem trying to produce the following > behavior: when a user opens the app, it should read their data from local > storage, insert it into these text fields, and then the user should be able > to edit the field, close the app, and repeat the process. > > The specific problem it that setting an input's value with 'onInput' > resets the cursor position to the end of the field every time they type. If > you don't set the value, then the input is always created empty, rather > than with the desired value. Perhaps using defaultValue would solve this > problem? > > > -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
