Repository navigation
fix(ios): match software Return before native input actions - #1967
Merged
Merged
Conversation
16 of 24 tasks
houko
force-pushed
the
fix/ios-software-return-1351
branch
from
November 22, 2026 14:55
182b5f2 to
04034a5
Compare
Collaborator
Author
|
Reviewed. Software Return from textFieldShouldReturn: and a text view's newline now goes to the keymap first, skipped while composing, for programmatic edits and while a physical Return is being handled; physical Return is matched in pressesBegan with its modifiers and falls through to super when nothing binds it. Rebased onto main (docs-only conflicts), pushed 04034a5, which also updates the skills/roadmap text now that main gives KeyAlways Backspace and select-all first on the mobile test hosts, and flattens the new comments. go vet -tags nsgotest for GOOS=ios passes; the earlier test/android/apple failures were in unrelated audio, Android overflow-press and web-mute tests. |
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.
A software Return currently bypasses the iOS keymap and reaches UITextField submission/blur or UITextView newline handling directly. An always-active Enter binding cannot prevent those native actions.
Offer each software Return to the surface's current keymap before native handling. Preserve automatic/not-editing bindings' normal yielding, marked-text composition, programmatic edits, input modality and complete software actions without a held-key repeat timer. Match physical Return at the editor with its actual modifiers, so an unhandled modified key is never matched again as an unmodified software Return. Route the physical-device test fallback through the same field action.
Update the public forms docs, architecture, remaining roadmap gaps, skill and changelog. Android already routes IME actions/newlines through its key matcher; its implementation is unchanged.
Closes #1351.
Validation:
go tool nsgo test -target ios_simulator -device DB612BC9-CED7-4D1E-A9B5-D652F105F242 -run '^Test(Input|Multiline|Titled|SoftwareReturn|HardwareReturn)' ./internal/platform/ios: 13 passed. Nine new native regressions cover both editor classes, submit/newline controls, newer automatic-binding precedence, marked text, programmatic edits, HID Return and modifiers, and the physical-device fallback with no held/repeating software key. Four existing native input/menu regressions also passed.go tool nsgo check -target ios,ios_simulator,tvos,tvos_simulator -jobs 2: all four targets passed.go tool nsgo test ./internal/platform/ios: 18 host logic tests passed.go tool nsgo test ./internal/moduletest: 12 passed, including layering, public API names and skills.go tool nsgo test ./tools/changelog: 11 passed;git diff --checkpassed.Verification used a task-owned local simulator and an isolated Go cache. Physical iPhone and tvOS runtime execution are not claimed.