Repository navigation
iOS: keep the port's keyboard handlers out of the SMS composer - #6220
Merged
Merged
Conversation
The keyboard notifications are process wide, so the keyboard of the native SMS composer reached keyboardWillShow/keyboardWillHide as if one of our own text fields had raised it: they recorded a keyboard height, called into Java and repainted underneath the sheet. Issue #6211 reports the composer intermittently opening with its entry field behind the keyboard. sendSMS now suspends that handling while the composer is presented. A show is ignored, and so is the hide that pairs with it, unless one of our own keyboards is still on record -- that hide is what restores the view. The flag clears itself when nothing is presented, so it cannot outlive the sheet and break text editing. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Contributor
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
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.
Issue #6211 reports the native SMS composer intermittently opening with its message field and send button behind the keyboard, with no text field of the application being edited.
The composer is Apple's UI, but iOS keyboard notifications are process wide, so its keyboard reached the port's
keyboardWillShow/keyboardWillHidehandlers as if one of our own text fields had raised it. They recorded a keyboard height, called into Java (which fires the application's virtual keyboard listeners and can pad and revalidate the current form) and repainted underneath the sheet.What changes
sendSMSsuspends the port's keyboard handling while the composer is presented, and the composer's delegate resumes it before dismissing.Testing
Not reproduced and not verified on a device: the iOS simulator reports
canSendTextas NO and will not present the composer, so this needs a physical iPhone. Both files were syntax-checked against a generated iOS project. Reading the handlers found no code that moves a view when nothing is being edited, so this is a workaround that also tells us whether the handlers are involved at all: if the problem persists with this change, they are ruled out.🤖 Generated with Claude Code