Skip to content

[MOO-2480] resolve keyboard covering inputs in iOS modal bottom sheet - #634

Open
stelselim wants to merge 3 commits into
mainfrom
moo/2480/fix-keyboard-avoid-view
Open

[MOO-2480] resolve keyboard covering inputs in iOS modal bottom sheet#634
stelselim wants to merge 3 commits into
mainfrom
moo/2480/fix-keyboard-avoid-view

Conversation

@stelselim

Copy link
Copy Markdown
Contributor

No description provided.

@stelselim
stelselim requested a review from a team as a code owner September 10, 2026 10:20
@stelselim stelselim changed the title draft: fix: resolve keyboard covering inputs in iOS modal bottom sheet [MOO-2480] resolve keyboard covering inputs in iOS modal bottom sheet Sep 10, 2026
* these take effect at all.
*/
const keyboardProps: Pick<GorhomBottomSheetProps, "keyboardBehavior" | "keyboardBlurBehavior"> =
Platform.OS === "ios" ? { keyboardBehavior: "interactive", keyboardBlurBehavior: "restore" } : {};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does restore fight with our own close()? If the keyboard hides mid-close, getEvaluatedPosition returns detents[currentIndex] and currentIndex is still 0, so it re-opens. And the index never changes, so no onChange/onClose, nothing retries. Worth trying: dismiss keyboard, tap backdrop right after.

return;
}

const subscription = Keyboard.addListener("keyboardWillShow", () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the keyboard is already open when the sheet mounts? No keyboardWillShow, so no target, so we're back to the original bug. Happens with on-change flow that set the trigger while a field is focused. Keyboard.isVisible() on mount?

@YogendraShelke

Copy link
Copy Markdown
Contributor

Looks like Expanding drawer has the same problem.

backgroundStyle={props.styles.container}
handleComponent={null}
handleStyle={{ display: "none" }}
{...keyboardProps}

@YogendraShelke YogendraShelke Sep 11, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keyboardBehavior: "interactive" clamps the shift at 0, so once the sheet is near the 90% maxDynamicContentSize cap it can't move up enough. And we don't scroll the input into view. Long form with a field at the bottom is probably still broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants