[Bug]: iOS composer falls behind the keyboard during thread hydration
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/mobile
Steps to reproduce
- Build the iOS app from
mainwith Reanimated 4.3.1. - Open a cached or heavy existing thread on an iPhone.
- Immediately focus the composer and type while the thread hydrates.
- Wait for hydration to commit new thread content.
The failure is intermittent in normal use. A deterministic repro blocks the JS thread for 1.8 seconds after keyboardDidShow, then forces an unrelated React commit. It reproduces the same frame transition on Reanimated 4.3.1.
Expected behavior
The composer stays docked above the visible software keyboard throughout thread hydration.
Actual behavior
The keyboard remains visible, but the composer moves to the physical bottom of the screen and becomes covered. Blur and refocus repair the position.
Diagnostic evidence
| Value | Healthy | Failed |
|---|---|---|
| System keyboard height | 335 | 335 |
| Keyboard top | 517 | 517 |
| Controller height | -335 | -335 |
| Controller progress | 1 | 1 |
| Keyboard visible | true | true |
| Editor focused | true | true |
| Sticky view enabled | true | true |
| Composer bottom | 517 | 852 |
This rules out a visibility race and controller-zero geometry for this incident. The natural physical-device failure and the deterministic repro have the same visible frame change.
Root cause
High confidence: Reanimated 4.3.1 can evict settled animated props before Fabric syncs an unrelated React commit. Fabric then restores the React transform of zero. The keyboard shared value remains -335, so the mapper does not run again. Blur and refocus change that value and repair the transform.
Reanimated PR #9527 fixes this settled-props race. The fix is present in 4.3.4.
Related work
- T3 PR #6607 adds a focus/visibility fallback. That helps a separate visibility race, but all related values were already true here.
- Reanimated issues #9965 and #9478 track this Fabric failure class.
- Keyboard Controller issue #1572 is a separate controller-height-zero failure.
Impact
Major degradation or frequent failure
Version or commit
main @ 3b5d476eb (Reanimated 4.3.1)
Environment
iPhone 15 Pro, iOS 26.6, portrait software keyboard, physical dev-client build
Logs or stack traces
systemHeight=335 keyboardTop=517 controllerHeight=-335 progress=1
isKeyboardVisible=true editorFocused=true stickyEnabled=true
composerBottom=517 -> 852 after hydration commit
Screenshots, recordings, or supporting files
t3-ios-composer-before-10s.mp4
IMG_7701.PNG
Workaround
Blur the composer, then focus it again.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in apps/mobile by checking the Reanimated dependency version and the keyboardDidShow/composer behavior described in the deterministic repro. Verify the upgrade to Reanimated 4.3.4 or another fix for the settled-props race, then reproduce hydration while typing on iOS and confirm the composer remains docked above the keyboard.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, react-native, typescript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100