Repository navigation
Send iOS AutoFill text to the live view's remote field once - #489
Open
masnwilliams wants to merge 4 commits into
Open
masnwilliams wants to merge 4 commits into
masnwilliams wants to merge 4 commits into
Conversation
masnwilliams
marked this pull request as ready for review
October 26, 2026 19:27
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a647f8a. Configure here.
masnwilliams
requested review from
ehfeng and
tnsardesai
and removed request for
ehfeng
October 26, 2026 19:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
On iPhone, tapping an AutoFill suggestion (for example your email above the keyboard) in a live view email field types it into the remote field two or three times.
Email, tel and code fields send each
inputevent's text to the remote as keys and then reset the overlay to its one-character sentinel. iOS fills a field by replacing its text, and it can take more than one edit to do it, or fill again once the overlay's value changes under it. Each of those edits was sent as new text.Changes
field-keyboard.ts: fields that offer AutoFill (email, tel, one-time-code, and contact fields such as name and address) keep their text in the overlay, the way autocorrect fields already do since Open the live view's soft keyboard from the remote browser's focus #464. Edits are diffed against what was sent, so a fill reaches the remote as backspaces and the missing text, however many edits it takes. Password, username, url and number fields keep the per-key path. So does the default keyboard, used when no field is known (the keyboard button, the address bar, or a focus held before the field is reported), since it offers codes from Messages.typed-text.ts: a value that no longer starts with the sentinel but is not empty means AutoFill replaced the whole value, sentinel included. That is new text, not a deletion of what came before, so no backspace is sent for the sentinel and the overlay is not reset.video.vue: in that case the sentinel is put back in front of the filled text instead of resetting the overlay, so a later backspace past the start is still seen.Testing
bun test tests: 259 pass. New tests replay the fill sequences this has to handle through the realonOverlayInput,TypedTextandTextInput: one replacement of the whole value, the same fill repeated three times, a space inserted before the replacement, and a fill that completes typed letters. All of them type the email exactly once, and a code filled twice on the default keyboard is typed once. The four component tests fail onmain(the repeated fill types it three times).main.Note
Medium Risk
Changes touch input routing for several field types on iOS; wrong diff or sentinel handling could mis-sync remote text, but scope is limited to the overlay keep-text path with new tests.
Overview
Fixes duplicate remote typing when iPhone users pick an AutoFill suggestion (email, phone, OTP, contact fields) in the live view touch overlay.
AutoFill-friendly keyboards now use the same keep-text + diff path as autocorrect:
field-keyboardsetskeepText: truefor email, tel, one-time-code, contact autocomplete, and the default keyboard (Messages codes).TypedText.edittreats a full-value replacement (sentinel stripped) as new fill text instead of a sentinel delete.video.vueaddsrestoreInputSentinel()so after a successful keep-text edit the overlay issentinel + filled textrather than reset—so repeated iOS fill events and later backspaces still behave correctly. Held-focus keyboard unlock usesDEFAULT_KEYBOARD.keepTextinstead of forcingfalse.Tests cover keyboard
keepTextrules,TypedTextAutoFill sequences, and component-levelonOverlayInputreplays (including triple repeated fills).Reviewed by Cursor Bugbot for commit 39e0c23. Bugbot is set up for automated code reviews on this repo. Configure here.