Repository navigation
Keep the iOS keyboard up when focus moves between text boxes - #22529
Merged
MrJul merged 1 commit intoOct 20, 2026
Merged
Conversation
Reset() made the AvaloniaView first responder before SetClient handed it to the next text box. AvaloniaView is not a text input, so UIKit dismissed the keyboard and presented it again on every focus change between text boxes. Reset() is now a no-op, as on Android. The input method manager always calls SetClient right after it, which makes the next text box's responder first responder directly. When focus leaves text input, SetClient(null) still dismisses the keyboard.
NuGet packagesThe packages for this pull request have been published (workflow run):
|
maxkatz6
approved these changes
Oct 19, 2026
MrJul
pushed a commit
that referenced
this pull request
Nov 2, 2026
Reset() made the AvaloniaView first responder before SetClient handed it to the next text box. AvaloniaView is not a text input, so UIKit dismissed the keyboard and presented it again on every focus change between text boxes. Reset() is now a no-op, as on Android. The input method manager always calls SetClient right after it, which makes the next text box's responder first responder directly. When focus leaves text input, SetClient(null) still dismisses the keyboard.
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.
What does the pull request do?
As agreed with @Gillibald, who confirmed that resetting the responder isn't required on iOS, this PR makes
ITextInputMethodImpl.Reset()a no-op on iOS, as it already is on Android, so the keyboard stays up when focus moves from one text box to another.What is the current behavior?
When focus moves between two text boxes, the keyboard slides down and comes back up.
TextInputMethodManagercallsReset()beforeSetClient(), and the iOSReset()makesAvaloniaViewthe first responder.AvaloniaViewis not a text input, so UIKit dismisses the keyboard, then presents it again whenSetClient()makes the next text box's responder first responder.What is the updated/expected behavior with this PR?
The keyboard stays up while focus moves between text boxes. Moving focus to a control that is not a text input still dismisses it, because
SetClient(null)still makesAvaloniaViewfirst responder.InputPaneno longer reports Closed then Open when focus moves between text boxes.To test: in ControlCatalog on iOS, open the TextBox page, focus one text box, then tap another.
How was the solution implemented (if it's not obvious)?
Reset()is always followed bySetClient(), which makes the next text box's responder first responder directly, and UIKit resigns the previous one without hiding the keyboard. Handing first responder to the view in between is not needed.Checklist
Breaking changes
None.
Fixed issues