Currently, morphdom updates Text nodes by directly replacing the entire nodeValue:
if (morphedNode.nodeValue !== toNode.nodeValue) {
morphedNode.nodeValue = toNode.nodeValue;
}
When working with AI-generated content, text typically grows incrementally as responses are generated. The current direct replacement approach causes any existing text selection to be lost, disrupting user interaction with the content.