@devries-cameron20 / t3code Mirror · read-only / commits / 56871c9c26
Fork 0

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 23, 04:15 UTC

fix(mobile): Chinese input no longer breaks before a skill pill on iOS (#17614)

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

IlyaL committed Oct 19, 2026 at 03:24 UTC 56871c9c268e9c348ed65faa60bd94ace2fe0c1d
1 file changed +12 -1
apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditorView.swift
+12 -1
@@ -469,6 +469,7 @@ public final class T3ComposerEditorView: ExpoView, UITextViewDelegate, UITextDro
469 private var pendingIconUris = Set<String>()
470 private var tokensNeedRebuild = false
471 private var chipsNeedMeasuredWidth = false
472 + private var hasDeferredForcedRebuild = false
473
474 let onComposerChange = EventDispatcher()
475 let onComposerSelectionChange = EventDispatcher()
@@ -839,11 +840,21 @@ public final class T3ComposerEditorView: ExpoView, UITextViewDelegate, UITextDro
840 }
841
842 private func applyControlledDocument(force: Bool = false) {
843 + // Rebuilding the attributed string tears down an active IME composition.
844 + // Skip while marked text exists; committing the composition sends a new
845 + // value from JS, and that update rebuilds, keeping any skipped force.
846 + if textView.markedTextRange != nil {
847 + hasDeferredForcedRebuild = hasDeferredForcedRebuild || force
848 + updatePlaceholderVisibility()
849 + return
850 + }
851 + let shouldForce = force || hasDeferredForcedRebuild
852 let currentSource = textView.serializedText()
843 - guard force || currentSource != value || !documentMatchesExpectedTokens() else {
853 + guard shouldForce || currentSource != value || !documentMatchesExpectedTokens() else {
854 updatePlaceholderVisibility()
855 return
856 }
857 + hasDeferredForcedRebuild = false
858
859 let previousSelection = sourceSelection()
860 isApplyingControlledValue = true