patching stateful DOM (input, textarea, form fields)
brucou opened this issue · comments
Hi there,
I love the direct DOM diffing, and I first experimented wit morphdom. I encountered one problem connected to what in React's terminology are controlled components. In short, when you diff <input value='sth'>
vs <input value='something'>
, the stateful part of the DOM is lost (field focus, cursor position, etc.).
I was wondering if that is something that you guys dealt with in nanomorph?
mm probably not: https://frontarm.com/demoboard/?id=dae24feb-32c8-4b7b-a43d-5a561babe9b8
if you click inside the text input, it seems like the cursor and focus is kept correctly. But I still would like a quick confirmation from user of the library.