Repository navigation
fix: don't report a zero-height keyboardWillShow as an open keyboard on iOS - #1677
Merged
kirillzyusko merged 5 commits intoOct 14, 2026
Merged
kirillzyusko merged 5 commits into
kirillzyusko merged 5 commits into
Conversation
Contributor
📊 Package size report
|
kirillzyusko
left a comment
Owner
There was a problem hiding this comment.
Looks good, let's address these two comments and we can merge it!
kirillzyusko
approved these changes
Oct 14, 2026
Owner
|
Thanks @seantanys Changes look good. I hope that Your changes anyway look good, so I'll merge them! Thank you for your contribution! |
Contributor
|
LGTM |
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.
📜 Description
Don't report a zero-height
keyboardWillShowas a fully open keyboard on iOS.💡 Motivation and Context
Closes #1676.
On a foldable iPhone, rotating with the keyboard closed makes iOS post
keyboardWillShowwith a zero-height frame.keyboardWillAppearalways sentonKeyboardMoveStartwithprogress: 1, so the event washeight: 0, progress: 1. TheonKeyboardMoveEndthat follows already reportsheight: 0, progress: 0, but on iOS the provider only applies the start event, soprogressstayed at1andKeyboardStickyViewused itsopenedoffset until the next real keyboard show/hide.The fix derives
progressfrom the frame height inkeyboardWillAppear, so the start event agrees with the end event. I kept it on the native side so the iOS animation stays driven by the one-shotonKeyboardMoveStartwrite: a real keyboard (height > 0) still reports1, so nothing changes for normal show/hide.Repro screen (from the issue)
📢 Changelog
iOS
progress: 0inonKeyboardMoveStartwhenkeyboardWillShowcarries a zero-height keyboard frame🤔 How Has This Been Tested?
FabricExampleDebug builds with Xcode 27, with the repro screen above:main, rotating with the keyboard closed leavesprogress: 1.00and drops the input; with this change it stays0.00. Checked with "Simulate Hardware Keyboard" on and offmainyarn typescriptandyarn lintpass. I couldn't run SwiftLint locally.I didn't add a native unit test:
KeyboardMovementObserverisn't compiled into the native test target onmain. #1668 adds that wiring and aKeyboardMovementObserverTests.swift, so I'm happy to add a case for this once it lands.📸 Screenshots (if appropriate):
iPhone Duo (iOS 27.1): before (left,
main) / after (right)duo-before-after.mp4
iPhone 17 Pro (iOS 26.2): after, no change in behaviour
pro-after.mp4
📝 Checklist