Root cause: when MentionInput updates innerHTML to reflect value changes, the browser resets the selection to position 0. The selectionchange event handler reads this wrong cursor position and sets ms.cursorOffset=0, breaking mentionState calculation for the popover. Fix: - MentionInput sets window.__mentionBlockSelection=true before innerHTML - Clears it via requestAnimationFrame after caret is restored - selectionchange handler skips cursor reading when flag is set |
||
|---|---|---|
| .. | ||
| app | ||
| assets | ||
| client | ||
| components | ||
| contexts | ||
| hooks | ||
| lib | ||
| App.css | ||
| App.tsx | ||
| index.css | ||
| main.tsx | ||