Typing over a double-click-selected word inserts instead of replacing (prompt editor)
Environment:
- Claude Code version: 2.1.221
- OS: macOS 26.5.2 (build 25F84)
- Surface: prompt input editor
Behavior observed:
Double-clicking a word selects it, as expected. But typing immediately after does not replace the selection — the new text is inserted next to it instead, leaving a garbled word (selected word + typed text concatenated). The only way to replace the selection is to press Delete first, then type.
Steps to reproduce:
- Click into the prompt input
- Double-click a word to select it
- Type a replacement character
- Observe: new text is inserted beside the selection rather than replacing it
Impact: Breaks the "type-over-selection" muscle memory from standard macOS/browser text fields. This is a very common editing action (select a word, retype it), so the interruption compounds over a session — repeatedly garbling text, then having to undo/delete/retype.
Expected behavior: Typing while text is selected should replace the selection, matching standard macOS and browser text-field conventions.