These are chat archives for jdubray/sam
onclick. As you have realized, the problem is re-rendering the link that was clicked on, as a result of processing blur/save/re-render. I was thinking of possible solutions, here is one: https://jsfiddle.net/foxdonut/940koxou/
setTimeout(fn, 0)inside the
innerHTMLis just too expensive, and it destroys element references.
setFocusaction should not be necessary.
BTW: I rewrote it to not use onBlur thinking that i could avoid the issue by saving the user input on every key stroke .. but no, typing in the textarea now is not fluid as it re-renders on every keyup as well. https://jsfiddle.net/foxdonut/940koxou/
I am coming away with what @devinivy said that the best solution is to just use a DOM diffing lib to keep the dom current in just the right places..
onBlur. I'd have a
Savebutton or something.