Using Html.Keyed + defaultValue we can avoid the cursor bug.
The basic idea is that we use defaultValue which only updates the value when the textarea is instantiated, at that point, the textarea becomes the master copy. If we ever need to change the value, then we need to change the key on the textarea which will cause the diffing algo to think it's different and recreate it thereby again triggering the defaultValue.
Closes
Closes #174
Description
Using
Html.Keyed
+defaultValue
we can avoid the cursor bug.The basic idea is that we use
defaultValue
which only updates the value when the textarea is instantiated, at that point, the textarea becomes the master copy. If we ever need to change the value, then we need to change the key on the textarea which will cause the diffing algo to think it's different and recreate it thereby again triggering thedefaultValue
.