fix(menu): account for keyboard already open when Menu mounts - #5122
Open
manchoudhary wants to merge 1 commit into
Open
manchoudhary wants to merge 1 commit into
manchoudhary wants to merge 1 commit into
Conversation
manchoudhary
force-pushed
the
fix/menu-keyboard-already-open
branch
2 times, most recently
from
September 14, 2026 18:07
3dbb724 to
033b0a8
Compare
Use Keyboard.metrics() when measuring layout so a Menu that mounts while the keyboard is visible still avoids it. Fixes callstack#5096.
manchoudhary
force-pushed
the
fix/menu-keyboard-already-open
branch
from
September 14, 2026 18:08
033b0a8 to
26358d5
Compare
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.
Motivation
Menuonly learned keyboard height fromkeyboardDidShowafter mount. iOS does not replay that event for a keyboard that is already open, so aMenuthat 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 lintyarn typecheckyarn test