[Bug]: iOS composer refills with the autocorrected message after Send #31210
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/mobile
Steps to reproduce#
- On iPhone, with Auto-Correction on (Settings > General > Keyboard), open a thread.
- On the on-screen keyboard, type a message whose last word is misspelled, with no trailing space, so the suggestion bar shows the correction highlighted in the middle, for example
Fix wierd. - Tap Send.
It reproduced every time I tried it this way: 3 of 3 runs on the simulator (Fix wierd, Fix adress, Fix seperate) and on purpose on the App Store app on a physical iPhone (... teh). As a control, Fix the build, with no correction pending, sent and left the composer empty.
Expected behavior#
The message is sent and the composer is empty.
Actual behavior#
The message is sent uncorrected (Fix wierd), and the composer then refills with the whole message with the correction applied (Fix weird), as if it hadn't been sent yet.
| Before Send | After Send |
|---|---|
![]() | ![]() |
Recording: repro.gif, repro.mp4. The other runs and the control are on the same evidence branch.
Impact#
Minor bug or occasional failure
Version or commit#
main @ a21d788752 (T3 Code Dev 2.2.0 (1)); also the App Store app, current on 2026-11-04
Environment#
iPhone 18 Pro simulator, iOS 27.2, Xcode 27.2, on-screen keyboard, Replay (dev) provider; and a physical iPhone running the App Store app
Logs or stack traces#
A temporary console.log trace (since removed) in T3ComposerEditor.ios.tsx (native change events and renders), ThreadComposer handleSend, and use-thread-composer-state just before clearComposerDraftContent. Typed Fix untill with until pending, then tapped Send. n is the native event count, js the JS side's last acknowledged count, and sent the count stamped on the controlled payload.
DBG change 38228 {"pv":"Fix until","n":25,"v":"Fix untill","js":24}
DBG handleSend start 48399 "Fix untill"
DBG clear draft 48404 {"sent":"Fix untill","now":"Fix untill"}
DBG change 48404 {"pv":"Fix untill","n":26,"v":"Fix until","js":25}
DBG render 48420 {"v":"Fix until","sent":26,"echo":true,"latest":26}
DBG render 48593 {"v":"Fix until","sent":26,"echo":true,"latest":26}
What this shows: the send handler reads the uncorrected text, and about 5 ms after Send is tapped the keyboard commits the pending correction. The native editor then emits a newer change event (26) in the same tick as the draft clear. T3ComposerEditor.ios.tsx accepts it because it's newer than the last acknowledged event, and its onChangeText writes the corrected text over the cleared draft. No render with an empty value ever happens, so the editor never receives the clear. I didn't pin down which UIKit action commits the correction; it lands before ThreadDetailScreen's KeyboardController.dismiss() runs. Android wasn't checked.
A fix could either drop a native change that arrives between the send reading the text and the draft clear, or apply the pending correction before the send reads the text, so the corrected message is what gets sent. I'm happy to send a PR once there's a preferred direction.
Workaround#
Don't tap Send while a correction is still pending; typing a space first applies it (not tested separately). If it happens, clear the composer by hand.
shivamhwp(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.

