DEV Community

Discussion on: Let's Improve the textarea!

Collapse
 
ianwijma profile image
Ian Wijma

I've made many "improved" text fields in the past. But I always bump info many edge cases. But it's a really fun and educative process I think. Good luck!

PS: ctrl-z / undo has weird behaviour when writing some thing like <test>. You remove the content, write some more and than hit undo / ctrl-z.

Collapse
 
siddharthshyniben profile image
Siddharth

Yeah, inserting the extra characters messes up the undo tree

Collapse
 
wintercounter profile image
Victor Vincent

You can fix that by fireing keypress events instead of overwriting values.

Thread Thread
 
siddharthshyniben profile image
Siddharth

Nice tip! Will definitely try it

Collapse
 
siddharthshyniben profile image
Siddharth

That sounds intresting, could just send me the links to them if you have them on GitHub or something?