You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
iOS: dictation can land in a different field after you move focus while it’s still processing #346
On the iPhone keyboard, if I release a dictation and then tap into another field before “Pasted,” the words often show up in the field I moved to — not the one I spoke into.
Looking at the App Group side, that lines up with how results are addressed. KeyboardCommand and presence already carry a controllerID (one host field). DictationResult only carries a process recipient. resultArrived() checks that the result is for this KeyboardProcess.id, then inserts into whatever textDocumentProxy is live. appeared() also calls resultArrived() unconditionally, so a new controller in the same extension process can pick up a pending result after blur / host switch.
So the process can be the right one and the field still wrong. Processing is allowed to outlive leaving the original field (clipboard handoff), which is the window where this happens.
Steps:
Blurt keyboard + Full Access, listening window up, key set.
Focus field A (Notes title, Messages search, etc.), dictate something distinctive, release so it shows processing — don’t cancel.
Before Pasted, tap field B in the same app (or jump to another app that also uses Blurt; same process often gets reused).
See which field gets the text.
Expected: insert only into the controller that owned the press/stop, or fall back to clipboard if that field is gone.
Actual: process-addressed result inserts into the new field’s proxy.
Useful spots:
App/BlurtiOS/BlurtiOSCore/SharedState.swift — DictationResult.recipient only; KeyboardCommand has controllerID
KeyboardRelayInjector.swift — builds the result with process id
DESIGN.md — result addressing is process-scoped; presence is process + controllerID
Fix I’d try: put controllerID on DictationResult from the accepted press/stop, and only insert when it matches self.controllerID (else leave it for the owner / clipboard timeout).
Related but not the same as #344: that one is stopRecipient routing to the wrong keyboard process, and a cancelled result left in SharedStore. This is successful processing, correct process, wrong field because controllerID never rides the result.
Activity