amilner42 / code-tidbit

Share Programming Knowledge Better
GNU General Public License v3.0
9 stars 1 forks source link

174 cursor jump #187

Closed amilner42 closed 7 years ago

amilner42 commented 7 years ago

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 the defaultValue.

amilner42 commented 7 years ago

Need to fix space-tabs on CreateBigbit/CreateSnipbit