max-mapper / yo-yo

A tiny library for building modular UI components using DOM diffing and ES6 tagged template literals
1.33k stars 65 forks source link

Problems with textarea #52

Closed emanchado closed 7 years ago

emanchado commented 7 years ago

It seems that there's a bug with keeping the value of textareas. A solution for it is described here:

https://github.com/patrick-steele-idem/morphdom/issues/88#issuecomment-252784028

You have a bit more context information at https://github.com/yoshuawuyts/choo/issues/253 (which is already linked from the first URL).

shama commented 7 years ago

Related issue: https://github.com/shama/bel/issues/36

phated commented 7 years ago

@shama do you see a problem with the following solution?

There's a line in yo-yo https://github.com/maxogden/yo-yo/blob/master/index.js#L31

If you flip the t/f you ge the expected outcome: https://esnextb.in/?gist=81944ffdfa6ebc00827d58d7c5a91441

I'm unable to reproduce this in morphdom under several variations of generating the html described.

I'm going to close this.

phated commented 7 years ago

Thanks @shama!

tors commented 7 years ago

Thank you @shama!