mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
Select-all + Cut emptied the text and left the composer blank — no draft, no prompt. Delete had the same hole. The placeholder is painted on `:empty`, and a cleared editor keeps a scaffolding <br> so the contenteditable can't collapse to a sliver. Those two facts collide: the moment the break lands the editor has a child, `:empty` goes false, and the prompt never comes back. CSS can't infer emptiness on its own either. A text node is invisible to selectors, so `one<br>` and a lone `<br>` are the same shape — a structural rule like `:has(> br:only-child)` paints the placeholder straight over the user's text. The code that empties the editor is what knows, so it marks the root and the condition reads `:is(:empty, [data-empty])`. Both writers that reshape that root maintain the marker through one helper: the normalizer, and renderComposerContents for a restored draft or an undo. The message-edit composer shares the slot and the rule, so it takes the same shared class instead of drifting on its own copy. #74815 fixed the draft this stashed; the placeholder is a separate seam. |
||
|---|---|---|
| .. | ||
| bootstrap-installer | ||
| desktop | ||
| shared | ||