Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: iOS composer falls behind the keyboard during thread hydration #7440

Closedmatsvarn(GitHub profile, opens in a new tab) opened this issue 1 comment

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

  1. Build the iOS app from main with Reanimated 4.3.1.
  2. Open a cached or heavy existing thread on an iPhone.
  3. Immediately focus the composer and type while the thread hydrates.
  4. 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

ValueHealthyFailed
System keyboard height335335
Keyboard top517517
Controller height-335-335
Controller progress11
Keyboard visibletruetrue
Editor focusedtruetrue
Sticky view enabledtruetrue
Composer bottom517852

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.

  • 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.

  1. matsvarn(GitHub profile, opens in a new tab) added labelsneeds-triage

  2. Thanks for taking the time to report this and provide the details. We revisited it during the orchestrator V2 cleanup.

    Current mobile dependency is Reanimated 4.7.0, beyond the reported 4.3.1 settled-props race and its 4.3.4 fix. Upstream PR 9527 is verified merged and changes eviction to require synchronization, matching this report’s nonzero keyboard geometry diagnosis.

    I’m closing this based on the current source and the evidence in this thread.

    Source reviewed.

    Requires a rebuilt native client carrying the new dependency; not a claim that separate keyboard-height/visibility races are fixed.

    If you still hit this on a current build, please reply with the app/server versions and the steps that reproduce it. We can reopen this if the original problem is still there.

  3. juliusmarminge closed this

Sign in to join this conversation.