| … | … | @@ -280,6 +274,35 @@ export function ComposerEditor({ | |
| 298 | + | .then(() => nativeRef.current?.readState()) | |
| 299 | + | .catch(() => undefined); | |
| 300 | + | // Paste events advance the count without changing text; consuming one here would drop it. | |
| 301 | + | if (state && state.value !== props.value) { | |
🟠 High native/T3ComposerEditor.ios.tsx:301
flushPendingInput can leave a pending text revision unacknowledged or consume an intercepted paste, causing the draft to reappear after send or the paste callback to be dropped. Comparing state.value with props.value misses edits that round-trip to the same text; when they differ, applyNativeChange can acknowledge the paste event count before onComposerPasteText or onComposerPasteContext arrives, so acceptNativeEvent rejects the paste callback. Track the event kind or otherwise preserve paste delivery instead of inferring it from text equality.
No longer relevant as of a6b8cfc6a2529efb0909f12222d8ee7a93259b80
Fixed in a6b8cfc. Valid on both points. The native view now records whether its latest event was a paste, and readState returns that as isPaste. The flush skips only that case, so it no longer compares text: two in-flight edits that cancel out are still acknowledged at the newest count, and their older events are rejected after the clear.
One case remains: a paste event and a newer text edit both still in flight when the tap lands. Pastes come from an earlier gesture, and their events are delivered long before a send tap, so I left it.
Re-verified on an iOS 27 simulator with a dev client built from a6b8cfc. Three sends with a pending "teh → the" correction went out corrected and left the composer empty. A 45 KB paste still became a pasted-text.txt attachment and sent normally.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.