The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 22, 03:15 UTC
fix(mobile): typing after in-app dictation reaches the draft again on iOS (#30139)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: maria-rcks <maria@kuuro.net>
wojas committed
Nov 6, 2026 at 08:49 UTC
bd3081711d7b568848b7928724222f2d4f8be459
1 file changed
+6
-2
apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditorView.swift
+6
-2
@@ -447,6 +447,7 @@ public final class T3ComposerEditorView: ExpoView, UITextViewDelegate, UITextDro
447
private var isReadOnly = false
448
private var isApplyingControlledValue = false
449
private var nativeEventCount = 0
450
+ private var hasControlledDocument = false
451
private var resetGeneration = 0
452
private var lastContentSize = CGSize.zero
453
private var iconImages: [String: UIImage] = [:]
@@ -676,12 +677,15 @@ public final class T3ComposerEditorView: ExpoView, UITextViewDelegate, UITextDro
677
}
678
if isReset {
679
resetGeneration = document.resetGeneration
679
- nativeEventCount = document.mostRecentEventCount
680
endComposition()
681
}
682
- if document.isNativeEcho && !isReset && textView.serializedText() != document.value {
682
+ // iOS destroys this view under display: none and mounts a fresh one while JS keeps its
683
+ // revision and draft. Continue from them, or JS drops every event the new view sends.
684
+ nativeEventCount = document.mostRecentEventCount
685
+ if document.isNativeEcho && !isReset && hasControlledDocument && textView.serializedText() != document.value {
686
return
687
}
688
+ hasControlledDocument = true
689
if tokensJson != document.tokensJson {
690
tokensJson = document.tokensJson
691
tokens = decode([ComposerTokenPayload].self, from: document.tokensJson) ?? []