When you select a paragraph in ChatGPT's UI as it's streaming in, your focus on the element is continuously lost each time a new text character streams in, so if you try and copy and select something mid-stream, it's a moving target. I wrote up a simple/quick fix.<p>I imagine landing the actual fix for them would be more difficult given they embed different elements alongside text, e.g. code blocks, which is where I first noticed this issue (trying to select a short snippit of code from a long block as it streams in).
I love this and was trying to recreate this (it used to work on ChatGPT) using pure HTML and JS. Would love to know what exactly react is doing that allows it to be selectable in this way, does it append to text node? What is allowing to work if it's streaming a few layers down like an li inside a ul inside an li inside an ol?