tdoc v0.7.9 — clear native selection after commenting
Fixes a confusing visual bug when commenting on selected text.
Reported: select one line, comment on it, and afterward that line plus everything below appears highlighted (worst across table cells).
Root cause was not the comment anchor — that's correct (the stored anchor and the highlight range are exactly the selected text). It was the browser's native text selection lingering after submit: closePopup() cleared the pending tdoc highlight but never called getSelection().removeAllRanges(), so the OS selection stayed painted over the doc until you clicked elsewhere.
Fix: closePopup() now clears the native selection too — one place, covering submit / cancel / Esc / click-away. Verified no regression to existing anchor highlights.
🤖 Generated with Claude Code