Investigate text reappearing after Send during Windows Voice Typing
Parent issue: #1045 Related keyboard fix: #1068
The original report says dictated text can remain or reappear in the composer after clicking Send during Windows Voice Typing. PR #1068 guards Enter keydown only; both Send buttons still call handleSubmit() directly. This subissue tracks reproduction and any necessary fix for the click path.
The suspected sequence is: Send submits and clears the draft while dictation is still composing, then a late composition/input update restores the dictated text through onChange. This sequence has not been independently reproduced during review, so confirm the event ordering before choosing a fix.
Reproduction from the parent report:
- On Windows 11, open the desktop chat surface in Edge or Chrome.
- Focus the composer, start Windows Voice Typing with Win+H, and dictate a short phrase.
- Click Send quickly while dictation is still active, repeating as needed because the report describes a timing-dependent failure.
- Check whether the sent text remains or reappears in the draft. Exercise both the welcome composer and the composer in an existing conversation.
Acceptance criteria:
- Reproduce the click-triggered behavior, recording browser versions and composition/input/click ordering, or document why it cannot be reproduced.
- If reproduced, ensure a successful Send submits the intended text once and leaves the draft clear after outstanding composition events settle.
- Cover the event sequence with a regression test and verify both built-in composers on Windows.
- Preserve normal Send behavior, streaming cancellation, and the Enter/Shift+Enter behavior covered by the keyboard subissue.
The workaround in the parent report describes direct DOM clearing as best-effort only; it is not a confirmed fix for this path. Keep #1045 open until both input paths have been resolved or explicitly dispositioned.
Source: thesysdev/openui