Repository navigation
fix(ios): hide the presenter's keyboard under a custom-dimmed sheet - #925
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Merged
3 of 9 tasks
This branch was successfully deployed
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
Since #911, focusing an input and then presenting a stacked sheet with
dimColorordimOpacityset no longer hides the keyboard on iOS. Native behavior (and v3) hides it while the sheet is up and brings it back on dismiss.UIKit only does this for a sheet dimmed at every detent (
largestUndimmedDetentIdentifier == nil). Custom dimming turns the native dim off by marking every detent undimmed, so UIKit skips it.The fix does the same thing UIKit does, but only for custom-dimmed sheets dimmed at every detent:
dismiss()or a dim tap, and on release for a swipe. A swipe that snaps back does nothing, as in UIKit.Sheets with
dimmedDetentIndex > 0ordimmed={false}keep the keyboard up, same as native.Type of Change
Test Plan
Bare example, iPhone 18 Pro Max simulator (iOS 27). Focus the main sheet's header input, then tap "TrueSheet View" (BasicSheet uses
dimColor).dimColor/dimOpacityremoved, it hides, which confirms the cause.Checklist