Skip to content

[$175] Regression: iOS 26 keyboard jumps when composer is being focused #105683

Open

Description

@mountiny

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number:
Reproducible in staging?: Y
Reproducible in production?:
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @mountiny
Slack conversation (hyperlinked to channel name):

Regression

This is a regression of ios 26 keyboard jumps when composer is being focused, which was closed on 2026-03-11. These PRs fixed it by updating react-native-keyboard-controller:

A candidate cause (not verified) is the later react-native-keyboard-controller upgrade in Upgrade react-native-keyboard-controller before RN 0.86 bump.

Action Performed:

The original issue reproduced on iOS 26 only, not on iOS 18.

  1. Open some report
  2. Click on the composer

Expected Result:

The composer should animate smoothly with the keyboard opening

Actual Result:

The page/ composer jumps after the keyboard opens smoothly

Workaround:

None needed, the composer still works. The animation is not smooth.

Platforms:

Select the officially supported platforms where the issue was reproduced:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop
Platforms Tested: On which of our officially supported platforms was this issue tested:
  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Issue OwnerCurrent Issue Owner: @jmusial
Upwork Automation - Do Not Edit

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 2, 2026
  2. self-assigned this
    on Nov 2, 2026
  3. MelvinBot commented on Nov 2, 2026

    @MelvinBot
    Contributor

    ⚠️ Preliminary analysis (low confidence): treat this as a starting point, not a conclusion.

    I couldn't find an App code change that explains the jump. The likely cause is the keyboard library (react-native-keyboard-controller, RNKC). The fix for [Due for payment soon?] [$500] ios 26 keyboard jumps when composer is being focused came only from RNKC upgrades. Since then, the App's keyboard handling on the report screen has barely changed. RNKC has been upgraded twice: chore: upgrade react-native-keyboard-controller to 1.22.2 on 2026-07-29 and chore: upgrade react-native-keyboard-controller to 1.22.4 on 2026-09-11.

    The report screen's keyboard handling is unchanged. RNKC's KeyboardAvoidingView with behavior="padding" wraps the screen in ScreenWrapperContainer.tsx:94 and ScreenWrapperContainer.tsx:201-216. The report screen turns it on in ReportScreen.tsx:116.

    I couldn't verify this because the bug only happens on iOS 26. I couldn't reproduce it here, and nobody has pinned down which build brought it back. To confirm:

    1. Try the latest RNKC (1.22.9). It has iOS fixes the App doesn't have yet, including don't report a zero-height keyboardWillShow as an open keyboard and shadow node sync on iOS. This is the cheapest test.
    2. Log keyboard events on an iOS 26 device. Log RNKC's onStart/onMove/onEnd while you tap the composer. If onMove fires rarely or never and onEnd snaps into place, the bug matches the upstream reports below. Also log useSafeAreaInsets().bottom before and after the keyboard opens. If it changes, the bottom spacer could push the composer.
    3. If it's still unclear, bisect builds. Compare builds from before and after 2026-07-29 (RNKC 1.22.2), 2026-08-10 (RN 0.86), and 2026-09-11 (RNKC 1.22.4). Also test before and after Migrate main chat to FlashList with inverted flag, merged 2026-04-15.
    Investigation details

    RNKC versions used by the App

    App PR Merged RNKC
    fix: missing animations in 2026-01-08 1.18.5 → 1.20.4 (reverted 2026-01-13)
    fix: update RNKC and RNPV to latest versions 2026-02-03 1.18.5 → 1.20.6 (reverted the same day)
    fix: missing keyboard animations 2026-02-11 1.18.5 → 1.21.0-beta.1 (the fix that stuck)
    chore: upgrade react-native-keyboard-controller to 1.22.2 2026-07-29 → 1.22.2
    chore: upgrade react-native-keyboard-controller to 1.22.4 2026-09-11 → 1.22.4 (current)

    The App's own RNKC patch (fix-insets-in-landscape) only changes Android code.

    Upstream RNKC changes, 1.21.0-beta.1 → 1.22.4

    The iOS code that animates the keyboard opening is nearly identical in both versions. The JS hooks the App uses (KeyboardAvoidingView, useKeyboardHandler) are also unchanged. One related change:

    Another upstream report shows a similar pattern: iOS 26: onMove is never called after app relaunch in Release builds, so KeyboardAwareScrollView doesn't scroll to the focused input. It was closed with advice to upgrade, but nobody shared a reproduction.

    App-side review

    I checked the PRs merged since 2026-02-11 that touched the report screen's keyboard handling. None adds a second layout change after the keyboard opens:

    Other possible causes (unverified)

    • FlashList migration. Since Migrate main chat to FlashList with inverted flag, the chat list keeps its visible position as the screen resizes. It may correct its scroll offset after the keyboard view shrinks the list. If the jump also happens on a short chat that can't scroll, this cause is ruled out.
    • Library upgrades. Reanimated 4.7.0, react-native-screens 4.28.0, and safe-area-context 5.9.1 changed in the same period. RNKC animates its keyboard view through Reanimated.

    Next Steps: Reply with @MelvinBot <your feedback> to refine this analysis. For example, tell me whether RNKC 1.22.9 fixes it, or which build first showed the jump.


    view run

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Nov 2, 2026
  5. melvin-bot commented on Nov 2, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @Eskalifer1 (External)

  6. changed the title [-]Regression: iOS 26 keyboard jumps when composer is being focused[/-] [+][$175] Regression: iOS 26 keyboard jumps when composer is being focused[/+] on Nov 2, 2026
  7. melvin-bot commented on Nov 2, 2026

    @melvin-bot
  8. camesenin commented on Nov 2, 2026

    @camesenin
  9. melvin-bot commented on Nov 2, 2026

    @melvin-bot

    ✅ Contributor details stored successfully. Thank you for contributing to Expensify!

  10. Eskalifer1 commented on Nov 3, 2026

    @Eskalifer1
    Contributor

    Hi @jmusial are you going to work on this one?

  11. jmusial commented on Nov 3, 2026

    @jmusial
    Contributor

    HEy @Eskalifer1, yes will pick it up today / tomorrow

  12. Eskalifer1 commented on Nov 3, 2026

    @Eskalifer1
    Contributor

    All right, I get it, thanks! I just wasn't sure if you'd be working on the issue or if I should follow the standard workflow.

  13. jmusial commented on Nov 4, 2026

    @jmusial
    Contributor

    Update: Two bugs cause this behaviour.

    ReportScreen only turns on its KeyboardAvoidingView once currentReportID updates, and since PR #87768 that update runs in a startTransition that can lag several seconds when a heavy report opens. Gating on the navigation state instead fixes this on Android.

    On iOS, Reanimated's commit pausing holds back the keyboard padding updates until the JS thread commits again. Turning on DISABLE_COMMIT_PAUSING_MECHANISM removed that delay in tests.

    I'm trying to find an alternative that would not require turning a global flag on.

    Android
    android-full-3way-realtime.mp4
    ios
    ios-full-3way-realtime.mp4
  14. mountiny commented on Nov 5, 2026

    @mountiny
    ContributorAuthor

    Nice findings!

  15. jeffrey-graham commented on Nov 7, 2026

    @jeffrey-graham
  16. melvin-bot commented on Nov 7, 2026

    @melvin-bot
  17. TassioSales commented on Nov 8, 2026

    @TassioSales

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    On iOS, focusing the chat composer causes the virtual keyboard to stutter or jump abruptly.

    What is the root cause of that problem?

    In ReportActionCompose.tsx / CustomKeyboardAvoidingView:
    When the text input is focused, both the native iOS keyboard event listener (keyboardWillShow) and KeyboardAvoidingView trigger simultaneous layout shifts. In addition, setComposerHeight executes asynchronously in response to onContentSizeChange, applying conflicting height adjustments during the keyboard animation window.

    What changes do you think we should make in order to solve the problem?

    1. In CustomKeyboardAvoidingView on iOS:
      • Use keyboardWillShow and keyboardWillHide exclusively with native driver animation easing curves to align layout adjustments with the native keyboard frame.
    2. In ReportActionCompose.tsx:
      • Suppress redundant height re-measurements during the active keyboard transition window, allowing the native keyboard animation to finish before updating composer container padding.

    What alternative solutions did you explore? (Optional)

    Switching behavior="position", but behavior="padding" with synchronized native animation curves delivers smooth transitions without layout jumps.

  18. mountiny commented on Nov 8, 2026

    @mountiny
    ContributorAuthor

    This is not open for proposals

  19. melvin-bot commented on Nov 9, 2026

    @melvin-bot

    @jmusial Huh... This is 4 days overdue. Who can take care of this?

  20. jmusial commented on Nov 10, 2026

    @jmusial
    Contributor

    Not overdue, working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions