Typing in input field makes cursor jump to the end of input
Maybe I'm doing it wrong, but here's an example of the bug: http://codepen.io/markmiro/pen/pjbVma?editors=001
Is there another way to get the Backbone model and React view to stay in sync? I would like to sync the two to do things like live input validation.
Thanks!
That would be awesome! But for now, the only working "solution" I got is duplicating the model attribute into the view state (on componentWillMount for example) then bind input onChange to setState with input value. And finally on a submit or whatever, set the model attribute with the view state... :disappointed:
Well you can also rely on an onBlur event instead of onChange, though that's not neat.