Skip to content

fix(menu): account for keyboard already open when Menu mounts - #5122

Open
manchoudhary wants to merge 1 commit into
callstack:mainfrom
manchoudhary:fix/menu-keyboard-already-open
Open

manchoudhary wants to merge 1 commit into
callstack:mainfrom
manchoudhary:fix/menu-keyboard-already-open

Conversation

@manchoudhary

@manchoudhary manchoudhary commented Sep 14, 2026

Copy link
Copy Markdown

Motivation

Menu only learned keyboard height from keyboardDidShow after mount. iOS does not replay that event for a keyboard that is already open, so a Menu that mounts while the keyboard is visible (for example a row added while typing) measured against the full window and laid items under the keyboard.

This uses Keyboard.metrics() when showing the menu (and seeds the ref on mount) so the already-open keyboard is accounted for.

Related issue

Fixes #5096

Screenshots / Videos

N/A — layout behavior; verified manually on iPhone 16 simulator.

Test plan

  • yarn lint
  • yarn typecheck
  • yarn test
  • Manual: open Menu with keyboard already open; menu stays above keyboard and scrolls instead of placing items under the keyboard

@manchoudhary
manchoudhary force-pushed the fix/menu-keyboard-already-open branch 2 times, most recently from 3dbb724 to 033b0a8 Compare September 14, 2026 18:07
Use Keyboard.metrics() when measuring layout so a Menu that mounts
while the keyboard is visible still avoids it. Fixes callstack#5096.
@manchoudhary
manchoudhary force-pushed the fix/menu-keyboard-already-open branch from 033b0a8 to 26358d5 Compare September 14, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Menu ignores the keyboard when it mounts while the keyboard is already open

1 participant